-
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] Invalidate prebuilt rules status after package upgrade or installation #150292
Conversation
e57997d
to
a0eb666
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
a0eb666
to
d19ff8a
Compare
..._solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx
Show resolved
Hide resolved
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.
Checked out, tested locally, and code reviewed -- LGTM!
Prior to checking out I was able to reproduce the issue as described in #150306, and then with these changes I was unable to reproduce the issue (the button showed up and worked as expected). Thanks for the fix here @xcrzx, and for all the cleanup around the useUpgradeSecurityPackages
hook. Looks great! 🙂
Note: I did find one pre-existing issue where we're not disabling both install buttons once clicked, which allows for duplicates to be installed, but should be easy to fix with your new changes and the useIsUpgradingSecurityPackages
hook.
…n engine package is missing (elastic#150181)
d19ff8a
to
1cd1f52
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @xcrzx |
…grade or installation (elastic#150292) **Resolves: elastic#150306 ## Summary Fixes the Load Prebuilt rules button not visible when users visit the rules management page for the first time (no prebuilt detection rules package installed). ## Steps to test 1. Ensure that the detection engine package is not installed: <img src="https://user-images.githubusercontent.com/1938181/216949857-a49731f3-535e-4813-95d3-62b2995500bb.png" width="600" /> 2. Navigate to the rules management page. ### Previously The "Load Elastic Prebuilt Rules" button is not visible, and users cannot install prebuilt rules. <img src="https://user-images.githubusercontent.com/1938181/216950430-4c57a3ad-3146-40a0-82c2-08c4fc2f65c3.png" width="600" /> ### With the fix Users now see loading animation, indicating that the package installation happens in the background. Once the package installation finishes, users see the Load Prebuilt rules button appear. https://user-images.githubusercontent.com/1938181/217585144-879fe288-0ede-4e01-b585-6aced1d89379.mov (cherry picked from commit 4f1f2a8)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…age upgrade or installation (#150292) (#151019) # Backport This will backport the following commits from `main` to `8.7`: - [[Security Solution] Invalidate prebuilt rules status after package upgrade or installation (#150292)](#150292) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dmitrii Shevchenko","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-13T15:00:20Z","message":"[Security Solution] Invalidate prebuilt rules status after package upgrade or installation (#150292)\n\n**Resolves: https://github.com/elastic/kibana/issues/150306**\r\n\r\n## Summary\r\n\r\nFixes the Load Prebuilt rules button not visible when users visit the\r\nrules management page for the first time (no prebuilt detection rules\r\npackage installed).\r\n\r\n## Steps to test\r\n\r\n1. Ensure that the detection engine package is not installed: <img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216949857-a49731f3-535e-4813-95d3-62b2995500bb.png\"\r\nwidth=\"600\" />\r\n2. Navigate to the rules management page.\r\n\r\n### Previously\r\n\r\nThe \"Load Elastic Prebuilt Rules\" button is not visible, and users\r\ncannot install prebuilt rules.\r\n\r\n<img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216950430-4c57a3ad-3146-40a0-82c2-08c4fc2f65c3.png\"\r\nwidth=\"600\" />\r\n\r\n### With the fix\r\n\r\nUsers now see loading animation, indicating that the package\r\ninstallation happens in the background. Once the package installation\r\nfinishes, users see the Load Prebuilt rules button appear.\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1938181/217585144-879fe288-0ede-4e01-b585-6aced1d89379.mov","sha":"4f1f2a84fdf3421d6b56aac82274dee2e881d376","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rules","Feature:Prebuilt Detection Rules","v8.7.0","v8.8.0"],"number":150292,"url":"https://github.com/elastic/kibana/pull/150292","mergeCommit":{"message":"[Security Solution] Invalidate prebuilt rules status after package upgrade or installation (#150292)\n\n**Resolves: https://github.com/elastic/kibana/issues/150306**\r\n\r\n## Summary\r\n\r\nFixes the Load Prebuilt rules button not visible when users visit the\r\nrules management page for the first time (no prebuilt detection rules\r\npackage installed).\r\n\r\n## Steps to test\r\n\r\n1. Ensure that the detection engine package is not installed: <img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216949857-a49731f3-535e-4813-95d3-62b2995500bb.png\"\r\nwidth=\"600\" />\r\n2. Navigate to the rules management page.\r\n\r\n### Previously\r\n\r\nThe \"Load Elastic Prebuilt Rules\" button is not visible, and users\r\ncannot install prebuilt rules.\r\n\r\n<img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216950430-4c57a3ad-3146-40a0-82c2-08c4fc2f65c3.png\"\r\nwidth=\"600\" />\r\n\r\n### With the fix\r\n\r\nUsers now see loading animation, indicating that the package\r\ninstallation happens in the background. Once the package installation\r\nfinishes, users see the Load Prebuilt rules button appear.\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1938181/217585144-879fe288-0ede-4e01-b585-6aced1d89379.mov","sha":"4f1f2a84fdf3421d6b56aac82274dee2e881d376"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150292","number":150292,"mergeCommit":{"message":"[Security Solution] Invalidate prebuilt rules status after package upgrade or installation (#150292)\n\n**Resolves: https://github.com/elastic/kibana/issues/150306**\r\n\r\n## Summary\r\n\r\nFixes the Load Prebuilt rules button not visible when users visit the\r\nrules management page for the first time (no prebuilt detection rules\r\npackage installed).\r\n\r\n## Steps to test\r\n\r\n1. Ensure that the detection engine package is not installed: <img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216949857-a49731f3-535e-4813-95d3-62b2995500bb.png\"\r\nwidth=\"600\" />\r\n2. Navigate to the rules management page.\r\n\r\n### Previously\r\n\r\nThe \"Load Elastic Prebuilt Rules\" button is not visible, and users\r\ncannot install prebuilt rules.\r\n\r\n<img\r\nsrc=\"https://user-images.githubusercontent.com/1938181/216950430-4c57a3ad-3146-40a0-82c2-08c4fc2f65c3.png\"\r\nwidth=\"600\" />\r\n\r\n### With the fix\r\n\r\nUsers now see loading animation, indicating that the package\r\ninstallation happens in the background. Once the package installation\r\nfinishes, users see the Load Prebuilt rules button appear.\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1938181/217585144-879fe288-0ede-4e01-b585-6aced1d89379.mov","sha":"4f1f2a84fdf3421d6b56aac82274dee2e881d376"}}]}] BACKPORT--> Co-authored-by: Dmitrii Shevchenko <[email protected]>
Resolves: #150306
Summary
Fixes the Load Prebuilt rules button not visible when users visit the rules management page for the first time (no prebuilt detection rules package installed).
Steps to test
Previously
The "Load Elastic Prebuilt Rules" button is not visible, and users cannot install prebuilt rules.
With the fix
Users now see loading animation, indicating that the package installation happens in the background. Once the package installation finishes, users see the Load Prebuilt rules button appear.
Screen.Recording.2023-02-07.at.16.22.09.mov