Repository navigation
[Logs UI] Fix Log Categorization UI failure due to infinite loop - #159090
Merged
tonyghiani merged 2 commits intoJun 6, 2023
Merged
Conversation
Contributor
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jun 6, 2023
…stic#159090) ## 📓 Summary With the usage of the `logViewReference` object (instead of the primitive `sourceId`) as a dependency for the log entries categories data fetching, the `useTrackedPromise` was continuously recreating the `getLogEntryCategoryDatasets` and `getTopLogEntryCategories` fetchers, which were consequently causing an infinite loop when called inside the related side effect and used as dependency. Using the `logViewReference.logViewId` property (equivalent to the legacy `sourceId` string) restores the expected behaviour. Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> (cherry picked from commit d6105d0)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jun 6, 2023
#159090) (#159106) # Backport Closes #158930 This will backport the following commits from `main` to `8.8`: - [[Logs UI] Fix Log Categorization UI failure due to infinite loop (#159090)](#159090) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Antonio Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2023-06-06T11:31:03Z","message":"[Logs UI] Fix Log Categorization UI failure due to infinite loop (#159090)\n\n## 📓 Summary\r\n\r\nWith the usage of the `logViewReference` object (instead of the\r\nprimitive `sourceId`) as a dependency for the log entries categories\r\ndata fetching, the `useTrackedPromise` was continuously recreating the\r\n`getLogEntryCategoryDatasets` and `getTopLogEntryCategories` fetchers,\r\nwhich were consequently causing an infinite loop when called inside the\r\nrelated side effect and used as dependency.\r\n\r\nUsing the `logViewReference.logViewId` property (equivalent to the\r\nlegacy `sourceId` string) restores the expected behaviour.\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"d6105d0bfe0634a0543e52ce3c1275ad0bd64250","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Logs UI","Team:Infra Monitoring UI","backport:prev-minor","v8.9.0"],"number":159090,"url":"https://github.com/elastic/kibana/pull/159090","mergeCommit":{"message":"[Logs UI] Fix Log Categorization UI failure due to infinite loop (#159090)\n\n## 📓 Summary\r\n\r\nWith the usage of the `logViewReference` object (instead of the\r\nprimitive `sourceId`) as a dependency for the log entries categories\r\ndata fetching, the `useTrackedPromise` was continuously recreating the\r\n`getLogEntryCategoryDatasets` and `getTopLogEntryCategories` fetchers,\r\nwhich were consequently causing an infinite loop when called inside the\r\nrelated side effect and used as dependency.\r\n\r\nUsing the `logViewReference.logViewId` property (equivalent to the\r\nlegacy `sourceId` string) restores the expected behaviour.\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"d6105d0bfe0634a0543e52ce3c1275ad0bd64250"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159090","number":159090,"mergeCommit":{"message":"[Logs UI] Fix Log Categorization UI failure due to infinite loop (#159090)\n\n## 📓 Summary\r\n\r\nWith the usage of the `logViewReference` object (instead of the\r\nprimitive `sourceId`) as a dependency for the log entries categories\r\ndata fetching, the `useTrackedPromise` was continuously recreating the\r\n`getLogEntryCategoryDatasets` and `getTopLogEntryCategories` fetchers,\r\nwhich were consequently causing an infinite loop when called inside the\r\nrelated side effect and used as dependency.\r\n\r\nUsing the `logViewReference.logViewId` property (equivalent to the\r\nlegacy `sourceId` string) restores the expected behaviour.\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"d6105d0bfe0634a0543e52ce3c1275ad0bd64250"}}]}] BACKPORT--> Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
Contributor
|
This PR backport didn't make it into the latest BC for 8.8.1. Updating the labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📓 Summary
Closes #158930
With the usage of the
logViewReferenceobject (instead of the primitivesourceId) as a dependency for the log entries categories data fetching, theuseTrackedPromisewas continuously recreating thegetLogEntryCategoryDatasetsandgetTopLogEntryCategoriesfetchers, which were consequently causing an infinite loop when called inside the related side effect and used as dependency.Using the
logViewReference.logViewIdproperty (equivalent to the legacysourceIdstring) restores the expected behaviour.