Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: number based alerts evaluation isn't working #4295

Merged
merged 4 commits into from
Nov 13, 2019

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented Oct 27, 2019

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Following the alerts new UI, all the threshold values are saved as strings. This change casts the value into a number, if the query result value is a number.

Related Tickets & Documents

Closes #4279.

@arikfr
Copy link
Member Author

arikfr commented Oct 28, 2019

I updated the logic:

  • Because boolean values are detected a numbers, I revised the test to make sure to exclude strings.
  • Cast all non number values to strings to make it possible to compare with a string.
  • In case of booleans, we cast to string and lower case (True -> true) because upper cased boolean values is Python specific and will be confusing for most users.

@ranbena
Copy link
Contributor

ranbena commented Oct 28, 2019

  • In case of booleans, we cast to string and lower case (True -> true) because upper cased boolean values is Python specific and will be confusing for most users.

To back it up, I believe a bool value will appear lowercase in the alert column value preview.

Screen Shot 2019-10-28 at 9 37 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number-based alerts are broken
2 participants