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] AIOps: Fixes render loop when using a saved search. #166934
[ML] AIOps: Fixes render loop when using a saved search. #166934
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 LGTM
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
To update your PR or re-run it, just comment with: cc @walterra |
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 ⚡
## Summary Fixes elastic#166079. If a user picked a saved search to investigate, the log pattern analysis page would freeze with an infinite render loop; the log rate analysis pate wouldn't freeze but repeatedly query for new data. This PR fixes the issue by memoizing the queries derived from the saved search information to avoid it being a new instance every time. ### Checklist - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit fabaa2f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#166956) # Backport This will backport the following commits from `main` to `8.10`: - [[ML] AIOps: Fix render loop when using saved search. (#166934)](#166934) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Walter Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2023-09-21T15:28:38Z","message":"[ML] AIOps: Fix render loop when using saved search. (#166934)\n\n## Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to investigate, the log pattern analysis\r\npage would freeze with an infinite render loop; the log rate analysis\r\npate wouldn't freeze but repeatedly query for new data.\r\n\r\nThis PR fixes the issue by memoizing the queries derived from the saved\r\nsearch information to avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:ML/AIOps","v8.11.0","v8.10.3"],"number":166934,"url":"https://github.com/elastic/kibana/pull/166934","mergeCommit":{"message":"[ML] AIOps: Fix render loop when using saved search. (#166934)\n\n## Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to investigate, the log pattern analysis\r\npage would freeze with an infinite render loop; the log rate analysis\r\npate wouldn't freeze but repeatedly query for new data.\r\n\r\nThis PR fixes the issue by memoizing the queries derived from the saved\r\nsearch information to avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166934","number":166934,"mergeCommit":{"message":"[ML] AIOps: Fix render loop when using saved search. (#166934)\n\n## Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to investigate, the log pattern analysis\r\npage would freeze with an infinite render loop; the log rate analysis\r\npate wouldn't freeze but repeatedly query for new data.\r\n\r\nThis PR fixes the issue by memoizing the queries derived from the saved\r\nsearch information to avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8"}},{"branch":"8.10","label":"v8.10.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
Summary
Fixes #166079.
If a user picked a saved search to investigate, the log pattern analysis page would freeze with an infinite render loop; the log rate analysis pate wouldn't freeze but repeatedly query for new data.
This PR fixes the issue by memoizing the queries derived from the saved search information to avoid it being a new instance every time.
Checklist