-
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
[ML] Preserve field formatters between rule executions #178621
[ML] Preserve field formatters between rule executions #178621
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
As discussed, unrelated to the changes here, the re-renders in the rule flyout when editing the rule is affecting usability.
edit_rule.mov
@elasticmachine merge upstream |
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.
Code 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.
Latest changes in 97c56d0 LGTM fixing the rerender issues mentioned in #178621 (review).
💚 Build Succeeded
Metrics [docs]Async chunks
Public APIs missing exports
History
To update your PR or re-run it, just comment with: cc @darnautov |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 51235a9) # Conflicts: # x-pack/plugins/ml/server/lib/alerts/alerting_service.ts # x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts
… (#178716) # Backport This will backport the following commits from `main` to `8.13`: - [[ML] Preserve field formatters between rule executions (#178621)](#178621) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dima Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-13T17:35:35Z","message":"[ML] Preserve field formatters between rule executions (#178621)","sha":"51235a9c7a53d1a8ef9340f01c028389b9dda61e","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Alerting/RuleTypes","Team:ML","v8.13.0","v8.14.0"],"number":178621,"url":"https://github.com/elastic/kibana/pull/178621","mergeCommit":{"message":"[ML] Preserve field formatters between rule executions (#178621)","sha":"51235a9c7a53d1a8ef9340f01c028389b9dda61e"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178621","number":178621,"mergeCommit":{"message":"[ML] Preserve field formatters between rule executions (#178621)","sha":"51235a9c7a53d1a8ef9340f01c028389b9dda61e"}}]}] BACKPORT-->
Summary
This PR adds caching for field formatters used for
typcial
andactual
values in the alerting context.Before the Data View service was initialized on each rule execution and called the
field_caps
API, which could cause performance issues, especially for large clusters and with a fairly frequent rule check interval.Checklist