-
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
[Security Solution]Failed to Fetch Rules and Timeline in Preview Flyout #146858
Comments
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
…out (#146904) ## Summary These changes fixes the issue with the unexpected "Failed to Fetch Rule" error toast that appears when user opens the alert details from the Rule Preview page. The issue was introduced by [recent refactoring](#142950) where we switched from the optional toast to showing error toast always when it is not possible to fetch the rule (see `useRuleWithFallback` hook). In case of Rule Preview the rule does not exist and thus server returns 404 (not found) error. In case of Rule Preview we would like to ignore this error and build the rule from the alert. Bug Ticket: #146858
Note, this unnecessary error toast issue also exists when viewing the |
…out (elastic#146904) ## Summary These changes fixes the issue with the unexpected "Failed to Fetch Rule" error toast that appears when user opens the alert details from the Rule Preview page. The issue was introduced by [recent refactoring](elastic#142950) where we switched from the optional toast to showing error toast always when it is not possible to fetch the rule (see `useRuleWithFallback` hook). In case of Rule Preview the rule does not exist and thus server returns 404 (not found) error. In case of Rule Preview we would like to ignore this error and build the rule from the alert. Bug Ticket: elastic#146858 (cherry picked from commit 1b4c661)
…ew Flyout (#146904) (#146921) # Backport This will backport the following commits from `main` to `8.6`: - [[Security Solution] Failed to Fetch Rules and Timeline in Preview Flyout (#146904)](#146904) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-02T20:17:54Z","message":"[Security Solution] Failed to Fetch Rules and Timeline in Preview Flyout (#146904)\n\n## Summary\r\n\r\nThese changes fixes the issue with the unexpected \"Failed to Fetch Rule\"\r\nerror toast that appears when user opens the alert details from the Rule\r\nPreview page.\r\n\r\nThe issue was introduced by [recent\r\nrefactoring](#142950) where we\r\nswitched from the optional toast to showing error toast always when it\r\nis not possible to fetch the rule (see `useRuleWithFallback` hook). In\r\ncase of Rule Preview the rule does not exist and thus server returns 404\r\n(not found) error. In case of Rule Preview we would like to ignore this\r\nerror and build the rule from the alert.\r\n\r\nBug Ticket: #146858","sha":"1b4c66101b02dd4c01582a0e7b684eb5b499101a","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","Team:Detection Rules","Team:Detection Alerts","backport:prev-minor","ci:cloud-deploy","v8.7.0"],"number":146904,"url":"https://github.com/elastic/kibana/pull/146904","mergeCommit":{"message":"[Security Solution] Failed to Fetch Rules and Timeline in Preview Flyout (#146904)\n\n## Summary\r\n\r\nThese changes fixes the issue with the unexpected \"Failed to Fetch Rule\"\r\nerror toast that appears when user opens the alert details from the Rule\r\nPreview page.\r\n\r\nThe issue was introduced by [recent\r\nrefactoring](#142950) where we\r\nswitched from the optional toast to showing error toast always when it\r\nis not possible to fetch the rule (see `useRuleWithFallback` hook). In\r\ncase of Rule Preview the rule does not exist and thus server returns 404\r\n(not found) error. In case of Rule Preview we would like to ignore this\r\nerror and build the rule from the alert.\r\n\r\nBug Ticket: #146858","sha":"1b4c66101b02dd4c01582a0e7b684eb5b499101a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146904","number":146904,"mergeCommit":{"message":"[Security Solution] Failed to Fetch Rules and Timeline in Preview Flyout (#146904)\n\n## Summary\r\n\r\nThese changes fixes the issue with the unexpected \"Failed to Fetch Rule\"\r\nerror toast that appears when user opens the alert details from the Rule\r\nPreview page.\r\n\r\nThe issue was introduced by [recent\r\nrefactoring](#142950) where we\r\nswitched from the optional toast to showing error toast always when it\r\nis not possible to fetch the rule (see `useRuleWithFallback` hook). In\r\ncase of Rule Preview the rule does not exist and thus server returns 404\r\n(not found) error. In case of Rule Preview we would like to ignore this\r\nerror and build the rule from the alert.\r\n\r\nBug Ticket: #146858","sha":"1b4c66101b02dd4c01582a0e7b684eb5b499101a"}}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <[email protected]>
@MadameSheema @karanbirsingh-qasource This bug was fixed and changes were merged in both main and 8.6 branches. |
Related issue: #145832 |
we have validated this issue on 8.6 BC 6 and below are the observations:
Build Details:
Screen-Cast: Create.new.rule.-.Kibana.Mozilla.Firefox.2022-12-08.11-19-38.mp4so can you please checkout the above screen capturing. thanks !! |
Hi @karanbirsingh-qasource 👋 Thank you for validating the fix. 404 in the network tab is expected, as we don't have an easy way to prevent requests from being sent on the front-end side. We know about this limitation and will try to work out a better solution, but for now, the fix just prevented the error toast from appearing. |
thanks @xcrzx for looking into and confirming the behavior . hence we are now good to close this issue. |
Describe the bug
Failed to Fetch Rules and Timeline in Preview Flyout
Build Details:
Steps
Screen-Shoot
Create.new.rule.-.Kibana.Mozilla.Firefox.2022-12-02.15-11-33.mp4
Error Prompt
The text was updated successfully, but these errors were encountered: