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

[ML] Fixes caching/memoizing Anomaly Explorer data calls #29579

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Jan 30, 2019

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 providing bounds as an argument which then can be used to check if the caching needs to be invalidated. By doing this timefilter isn't necessary anymore as a dependency for the whole explorer_utils.js file.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@walterra walterra added non-issue Indicates to automation that a pull request should not appear in the release notes regression v7.0.0 :ml Feature:ml-results legacy - do not use v6.7.0 labels Jan 30, 2019
@walterra walterra self-assigned this Jan 30, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡️

walterra added a commit to walterra/kibana that referenced this pull request Jan 31, 2019
…hanged time ranges. (elastic#29579)

Fixes caching/memoizing Anomaly Explorer data calls related to changed time ranges.
walterra added a commit that referenced this pull request Jan 31, 2019
…hanged time ranges. (#29579) (#29588)

Fixes caching/memoizing Anomaly Explorer data calls related to changed time ranges.
@sophiec20 sophiec20 added the Feature:Anomaly Detection ML anomaly detection label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Anomaly Detection ML anomaly detection Feature:ml-results legacy - do not use :ml non-issue Indicates to automation that a pull request should not appear in the release notes regression v6.7.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants