-
Notifications
You must be signed in to change notification settings - Fork 900
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
Add hash_expression to MiqAlert #15315
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not for this PR, but we are mixing evaluation of 2 different expression types into a single method, and that is causing confusion. I think this would be a LOT clearer if the two evaluation strategies were split into methods, with eval_expression branching between those
I think I'm also leaning towards using
expression
where possible in the places where it has been changed to individually checkmiq_expression
, thenhash_expression
, thennil
. Checking for each one in turn is sort of the purpose of theexpression
method itself.However, in a method like my suggested
eval_hash_expression
, where you know you are working with hash_expression, then yes, you would access it directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fryguy This is defiantly the direction we are aiming at. As @imtayadeway pointed in an earlier discussion, having both expression types in the same column was the root problem here, which we hope to handle in this PR (and its related schema change). The next step will be trying to better encapsulate these types and their evaluation, maybe with two new tables each with one column (it will probably require more discussion). However, since this PR blocks some other items we are working on we would like to move forward with the current implementation as an initial solution if you are OK with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great @zakiva