-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 Checks to Dashboard Context #13182
Conversation
@simianhacker Can you add a unit test to this to ensure it doesn't regress in the future? This bug is pretty subtle and has a huge impact |
I've confirmed this does fix the beats dashboard issue |
Adding these checks definitely makes This line seems to be the root of all our trouble. It wraps the query even if the query does not exist (as would be the case with old dashboards, Timelion saved visualizations, etc). If we just wrap that line with a conditional, all the errors go away:
|
Thanks @Bargs, I added that fix as well. |
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.
LGTM
* Fixes #13181 - Check values before adding them to filter * Adding tests * Adding check to make sure query is never undefined
* Fixes #13181 - Check values before adding them to filter * Adding tests * Adding check to make sure query is never undefined
This PR fixes #13181 by adding checks to the values before adding queries to the dashboard context filter. The bug was originally introduced in #12624.
This also fixes elastic/beats#4777