-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] Fixes caching/memoizing Anomaly Explorer data calls #29579
Conversation
…hanged time ranges.
Pinging @elastic/ml-ui |
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.
Tested and LGTM
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
💚 Build Succeeded |
💚 Build Succeeded |
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 ⚡️
…hanged time ranges. (elastic#29579) Fixes caching/memoizing Anomaly Explorer data calls related to changed time ranges.
Summary
Fixes caching/memoizing Anomaly Explorer data calls related to changed time ranges, an issue introduced in #28750. The PR introduced caching the data calls for anomaly explorer. The caching parameters didn't properly consider changed time ranges to invalidate the cache.
This fixes it by making the affected function calls more pure and moving the
timefilter
dependency out of the functions and instead providingbounds
as an argument which then can be used to check if the caching needs to be invalidated. By doing thistimefilter
isn't necessary anymore as a dependency for the wholeexplorer_utils.js
file.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately