-
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
[Discover] Catch potental missing meta of filter #129183
Conversation
@elasticmachine merge upstream |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
test('broken filter - edge case', () => { | ||
const filters = [testFilterBroken]; | ||
const result = hasActiveFilter(filters); | ||
expect(result).toBe(true); | ||
}); |
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.
this is the test that actually would the original issue of having a broken filter object
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @kertal |
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.
Thanks for fixing and adding tests!
Summary
The issue of #126464 (broken filter object led to an exception when no data was found) was discovered in 7.15.1 and was not reproducible in recent Kibana version (>= 7.17). However, looking at the code that failed due to a broken filter object missing the
meta
property, this PR improves the functionality that led to the problem in #126464. So, just in case Discover retrieves a broken Filter object again, it won't fail.Fixes #126464
Testing
There's no known way to manually test this, since AFAIK the problem with broken Filters no longer exists, so there's a unit test responsible for testing.
Checklist