question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Number-based alerts are broken

See original GitHub issue

Issue Summary

It looks like the alert always sees a query result as a string and not a number. So an alert configured to trigger when field = 0 never triggers because "0" does not equal 0.

The alerts seems to evaluate fine for targets that are obviously strings. If the alert should trigger if field = boyhowdy then the alert triggers when field is “boyhowdy”.

Steps to Reproduce

  1. Save a query that returns 0: SELECT 0 "value"
  2. Make an alert for the query that triggers when value = 0
  3. Run the query
  4. Observe the alert does not trigger.

The converse is also true, by the way.

  1. Same as above
  2. Make an alert for the query that triggers when value != 0
  3. Run the query
  4. Observe the alert triggers

Technical details:

  • Redash Version: 9.0.0-alpha+b348b58b (348b58b)
  • Browser/OS: Firefox on MacOS
  • How did you install Redash: SaaS

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
ranbenacommented, Oct 23, 2019

Not sure about this, but perhaps we can hint at string values with apostrophes.

Screen Shot 2019-10-23 at 10 35 10
1reaction
arikfrcommented, Oct 22, 2019

I think that if query result is a number, then we should try to cast both to number. In other cases: use a string.

Because the operation options we show are based on the query result type, the threshold should adhere. We might want to enforce this in the UI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >
Location-based / geofencing alerts broken in UniFi Protect
After updating the firmware on my Cloud Key Gen2 Plus about a month ago, the geofencing functionality stopped working. Since then I have...
Read more >
Alerts/Widget Troubleshooting - Streamlabs
Ensure that both options have something selected. Go to Streamlabs.com > Alert Box > Follows/Subscriptions/Donations/Etc. > Alert Animation and make sure there ...
Read more >
5 ways to fix iPhone notifications when you're not receiving them
1. Hold down the side button and volume up button or volume down button. · 2. When the power slider appears on your...
Read more >
[Still persists] iPhone users on iOS 14 reporting no ...
Several users have taken to the Apple forums complaining about receiving no notifications or alerts on iOS 14. The cause behind the problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found