-
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
[8.x] [Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999) #205104
Merged
kibanamachine
merged 1 commit into
elastic:8.x
from
kibanamachine:backport/8.x/pr-204999
Dec 23, 2024
Merged
[8.x] [Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999) #205104
kibanamachine
merged 1 commit into
elastic:8.x
from
kibanamachine:backport/8.x/pr-204999
Dec 23, 2024
Conversation
This file contains 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
…o lack of memoization (elastic#204999) ## Summary This PR fixes [an issue](elastic/security-team#11424) raised recently where opening a preview panel for a host of user on top of a flyout already showing a host or user was getting the UI stuck into an infinite loop. While we found a few ways to fix the issue - primarily adding memoization to the UI components within the HostPanel and UserPanel, the approach in this PR fixes the issue at a more root level. Infinite loop behavior https://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8 Issue fixed https://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216 This fix should also potentially bring some performance improvement to all the components that are using the hook (we have a few). (cherry picked from commit 96264d2)
💚 Build Succeeded
Metrics [docs]Async chunks
|
PhilippeOberti
added a commit
that referenced
this pull request
Jan 6, 2025
…l due to lack of memoization (#204999) (#205624) # Backport This will backport the following commits from `main` to `8.17`: - [[Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999)](#204999) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Philippe Oberti","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-23T15:55:30Z","message":"[Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999)\n\n## Summary\r\n\r\nThis PR fixes [an\r\nissue](elastic/security-team#11424) raised\r\nrecently where opening a preview panel for a host of user on top of a\r\nflyout already showing a host or user was getting the UI stuck into an\r\ninfinite loop.\r\n\r\nWhile we found a few ways to fix the issue - primarily adding\r\nmemoization to the UI components within the HostPanel and UserPanel, the\r\napproach in this PR fixes the issue at a more root level.\r\n\r\nInfinite loop behavior\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\r\n\r\nIssue fixed\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\r\n\r\nThis fix should also potentially bring some performance improvement to\r\nall the components that are using the hook (we have a few).","sha":"96264d29237f0b7cfc8c651393f12d248f0d84e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","backport:version","v8.18.0"],"number":204999,"url":"https://github.com/elastic/kibana/pull/204999","mergeCommit":{"message":"[Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999)\n\n## Summary\r\n\r\nThis PR fixes [an\r\nissue](elastic/security-team#11424) raised\r\nrecently where opening a preview panel for a host of user on top of a\r\nflyout already showing a host or user was getting the UI stuck into an\r\ninfinite loop.\r\n\r\nWhile we found a few ways to fix the issue - primarily adding\r\nmemoization to the UI components within the HostPanel and UserPanel, the\r\napproach in this PR fixes the issue at a more root level.\r\n\r\nInfinite loop behavior\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\r\n\r\nIssue fixed\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\r\n\r\nThis fix should also potentially bring some performance improvement to\r\nall the components that are using the hook (we have a few).","sha":"96264d29237f0b7cfc8c651393f12d248f0d84e0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204999","number":204999,"mergeCommit":{"message":"[Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999)\n\n## Summary\r\n\r\nThis PR fixes [an\r\nissue](elastic/security-team#11424) raised\r\nrecently where opening a preview panel for a host of user on top of a\r\nflyout already showing a host or user was getting the UI stuck into an\r\ninfinite loop.\r\n\r\nWhile we found a few ways to fix the issue - primarily adding\r\nmemoization to the UI components within the HostPanel and UserPanel, the\r\napproach in this PR fixes the issue at a more root level.\r\n\r\nInfinite loop behavior\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\r\n\r\nIssue fixed\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\r\n\r\nThis fix should also potentially bring some performance improvement to\r\nall the components that are using the hook (we have a few).","sha":"96264d29237f0b7cfc8c651393f12d248f0d84e0"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/205104","number":205104,"state":"MERGED","mergeCommit":{"sha":"3d88e86b0787aa3faaa8c2bffd04b31d53d0008f","message":"[8.x] [Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999) (#205104)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Security Solution] - fixing infinite look on host flyout panel due\nto lack of memoization\n(#204999)](https://github.com/elastic/kibana/pull/204999)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Philippe\nOberti\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-12-23T15:55:30Z\",\"message\":\"[Security\nSolution] - fixing infinite look on host flyout panel due to lack of\nmemoization (#204999)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes\n[an\\r\\nissue](https://github.com/elastic/security-team/issues/11424)\nraised\\r\\nrecently where opening a preview panel for a host of user on\ntop of a\\r\\nflyout already showing a host or user was getting the UI\nstuck into an\\r\\ninfinite loop.\\r\\n\\r\\nWhile we found a few ways to fix\nthe issue - primarily adding\\r\\nmemoization to the UI components within\nthe HostPanel and UserPanel, the\\r\\napproach in this PR fixes the issue\nat a more root level.\\r\\n\\r\\nInfinite loop\nbehavior\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\\r\\n\\r\\nIssue\nfixed\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\\r\\n\\r\\nThis\nfix should also potentially bring some performance improvement to\\r\\nall\nthe components that are using the hook (we have a\nfew).\",\"sha\":\"96264d29237f0b7cfc8c651393f12d248f0d84e0\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"backport\",\"release_note:skip\",\"v9.0.0\",\"Team:Threat\nHunting:Investigations\",\"backport:version\",\"v8.18.0\"],\"title\":\"[Security\nSolution] - fixing infinite look on host flyout panel due to lack of\nmemoization\",\"number\":204999,\"url\":\"https://github.com/elastic/kibana/pull/204999\",\"mergeCommit\":{\"message\":\"[Security\nSolution] - fixing infinite look on host flyout panel due to lack of\nmemoization (#204999)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes\n[an\\r\\nissue](https://github.com/elastic/security-team/issues/11424)\nraised\\r\\nrecently where opening a preview panel for a host of user on\ntop of a\\r\\nflyout already showing a host or user was getting the UI\nstuck into an\\r\\ninfinite loop.\\r\\n\\r\\nWhile we found a few ways to fix\nthe issue - primarily adding\\r\\nmemoization to the UI components within\nthe HostPanel and UserPanel, the\\r\\napproach in this PR fixes the issue\nat a more root level.\\r\\n\\r\\nInfinite loop\nbehavior\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\\r\\n\\r\\nIssue\nfixed\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\\r\\n\\r\\nThis\nfix should also potentially bring some performance improvement to\\r\\nall\nthe components that are using the hook (we have a\nfew).\",\"sha\":\"96264d29237f0b7cfc8c651393f12d248f0d84e0\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/204999\",\"number\":204999,\"mergeCommit\":{\"message\":\"[Security\nSolution] - fixing infinite look on host flyout panel due to lack of\nmemoization (#204999)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes\n[an\\r\\nissue](https://github.com/elastic/security-team/issues/11424)\nraised\\r\\nrecently where opening a preview panel for a host of user on\ntop of a\\r\\nflyout already showing a host or user was getting the UI\nstuck into an\\r\\ninfinite loop.\\r\\n\\r\\nWhile we found a few ways to fix\nthe issue - primarily adding\\r\\nmemoization to the UI components within\nthe HostPanel and UserPanel, the\\r\\napproach in this PR fixes the issue\nat a more root level.\\r\\n\\r\\nInfinite loop\nbehavior\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8\\r\\n\\r\\nIssue\nfixed\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216\\r\\n\\r\\nThis\nfix should also potentially bring some performance improvement to\\r\\nall\nthe components that are using the hook (we have a\nfew).\",\"sha\":\"96264d29237f0b7cfc8c651393f12d248f0d84e0\"}},{\"branch\":\"8.x\",\"label\":\"v8.18.0\",\"branchLabelMappingKey\":\"^v8.18.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by: Philippe Oberti <[email protected]>"}}]}] BACKPORT-->
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.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation