-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.6] [Security Solution] Update cache invalidation logic to handle e…
…rror responses (#146271) (#146380) # Backport This will backport the following commits from `main` to `8.6`: - [[Security Solution] Update cache invalidation logic to handle error responses (#146271)](#146271) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dmitrii Shevchenko","email":"dmitrii.shevchenko@elastic.co"},"sourceCommit":{"committedDate":"2022-11-28T11:50:40Z","message":"[Security Solution] Update cache invalidation logic to handle error responses (#146271)\n\n**Resolves: #146277 Summary\r\n\r\nPreviously, we invalidated the rules table cache only after successful\r\nserver-side state mutations. So when an action like bulk edit was\r\nsuccessfully updating some rules and failing for others, the table\r\ncontinued showing outdated results.\r\n\r\nThis PR moves the cache invalidation from the `onSuccess` handlers to\r\nthe `onSettled` handlers to prevent showing partially stale data after\r\nfailed updates.","sha":"e9bc60355858c82fe39676622004f8e9cdfa61a2","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","impact:low","Team:Detections and Resp","Team: SecuritySolution","auto-backport","Feature:Rule Management","Team:Detection Rules","v8.6.0","v8.7.0"],"number":146271,"url":"#146271 Solution] Update cache invalidation logic to handle error responses (#146271)\n\n**Resolves: #146277 Summary\r\n\r\nPreviously, we invalidated the rules table cache only after successful\r\nserver-side state mutations. So when an action like bulk edit was\r\nsuccessfully updating some rules and failing for others, the table\r\ncontinued showing outdated results.\r\n\r\nThis PR moves the cache invalidation from the `onSuccess` handlers to\r\nthe `onSettled` handlers to prevent showing partially stale data after\r\nfailed updates.","sha":"e9bc60355858c82fe39676622004f8e9cdfa61a2"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"#146271 Solution] Update cache invalidation logic to handle error responses (#146271)\n\n**Resolves: #146277 Summary\r\n\r\nPreviously, we invalidated the rules table cache only after successful\r\nserver-side state mutations. So when an action like bulk edit was\r\nsuccessfully updating some rules and failing for others, the table\r\ncontinued showing outdated results.\r\n\r\nThis PR moves the cache invalidation from the `onSuccess` handlers to\r\nthe `onSettled` handlers to prevent showing partially stale data after\r\nfailed updates.","sha":"e9bc60355858c82fe39676622004f8e9cdfa61a2"}}]}] BACKPORT--> Co-authored-by: Dmitrii Shevchenko <dmitrii.shevchenko@elastic.co>
- Loading branch information
1 parent
2499d55
commit 8320b80
Showing
5 changed files
with
86 additions
and
56 deletions.
There are no files selected for viewing
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
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
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
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
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