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] Utilize the DataViewLazy in ML plugin #189188

Merged
merged 5 commits into from
Jul 26, 2024

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Jul 25, 2024

Summary

Closes #173996

The benefit of DataViewLazy is that it no longer triggers a field_caps request to Elasticsearch when being initialized. Since fields are not needed for these particular usages in the ML plugin, this change reduces redundant requests to Elasticsearch.

This PR also adds the findLazy method to the data view service that returns DataViewLazy instances instead of the DataView.

Checklist

@darnautov darnautov self-assigned this Jul 25, 2024
Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

data view service improvements look good, thanks!

@darnautov darnautov marked this pull request as ready for review July 26, 2024 09:12
@darnautov darnautov requested review from a team as code owners July 26, 2024 09:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@darnautov
Copy link
Contributor Author

@elasticmachine merge upstream

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

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViews 61.5KB 61.7KB +231.0B
Unknown metric groups

API count

id before after diff
data 3199 3205 +6
dataViews 1158 1170 +12
total +18

References to deprecated APIs

id before after diff
ml 35 34 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @darnautov

@darnautov darnautov merged commit 2d83c0e into elastic:main Jul 26, 2024
22 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting :ml release_note:enhancement Team:ML Team label for ML (also use :ml) v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataViews] Evaluate switching ML alert rules to make use of DataViewLazy
6 participants