[Security Solution] Add a migration to unmute custom Security Solution rules#156593
[Security Solution] Add a migration to unmute custom Security Solution rules#156593maximpn merged 5 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
This needs a jest test in https://github.com/elastic/kibana/blob/main/x-pack/plugins/alerting/server/saved_objects/migrations/index.test.ts Ideally, we could also add a function test, but they tend to be hairy, and this seems like a pretty simple migration. But could you take a look? Will help with any future regressions ... https://github.com/elastic/kibana/blob/main/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/migrations.ts |
There was a problem hiding this comment.
Checked out, tested locally, and upon upgrade rules are no longer being automatically snoozed. I agree w/ @pmuellr that we should add a jest test here as well, and maybe functional test if possible, but other than that LGTM 👍 🍨
Test steps:
- Checked out
8.7.2, installed prebuilt rules and created a couple custom rules - Terminated ES & Kibana processes
- Checkout out this branch, restarted ES, then Kibana
- Verified rules were enabled and no snooze was active.
x-pack/plugins/alerting/server/saved_objects/migrations/8.8/index.ts
Outdated
Show resolved
Hide resolved
91ea31e to
2ca6d24
Compare
|
@pmuellr thank you for the review, I've added unit and functional tests as you requested. |
0055c0a to
5c55432
Compare
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @maximpn |
…n rules (elastic#156593) **Addresses:** elastic#156352 ## Summary This PR adds a migration to unmute all Security Solution's custom rules while migrating to Kibana `8.8`. As we added support for rule snoozing in `8.8` elastic/security-team#5308 users are able to manage muting of rule notifications. Prior `8.8` Security Solution's custom rules were muted under the hood if there is no actions. (cherry picked from commit fc107d0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…olution rules (#156593) (#156728) # Backport This will backport the following commits from `main` to `8.8`: - [[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)](#156593) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2023-05-04T19:11:35Z","message":"[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)\n\n**Addresses:** https://github.com/elastic/kibana/issues/156352\r\n\r\n## Summary\r\n\r\nThis PR adds a migration to unmute all Security Solution's custom rules while migrating to Kibana `8.8`. As we added support for rule snoozing in `8.8` elastic/security-team#5308 users are able to manage muting of rule notifications. Prior `8.8` Security Solution's custom rules were muted under the hood if there is no actions.","sha":"fc107d0e5b36e7bc49f4230f2a85d50d16050323","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rules","backport:prev-minor","v8.8.0","v8.9.0"],"number":156593,"url":"https://github.com/elastic/kibana/pull/156593","mergeCommit":{"message":"[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)\n\n**Addresses:** https://github.com/elastic/kibana/issues/156352\r\n\r\n## Summary\r\n\r\nThis PR adds a migration to unmute all Security Solution's custom rules while migrating to Kibana `8.8`. As we added support for rule snoozing in `8.8` elastic/security-team#5308 users are able to manage muting of rule notifications. Prior `8.8` Security Solution's custom rules were muted under the hood if there is no actions.","sha":"fc107d0e5b36e7bc49f4230f2a85d50d16050323"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156593","number":156593,"mergeCommit":{"message":"[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)\n\n**Addresses:** https://github.com/elastic/kibana/issues/156352\r\n\r\n## Summary\r\n\r\nThis PR adds a migration to unmute all Security Solution's custom rules while migrating to Kibana `8.8`. As we added support for rule snoozing in `8.8` elastic/security-team#5308 users are able to manage muting of rule notifications. Prior `8.8` Security Solution's custom rules were muted under the hood if there is no actions.","sha":"fc107d0e5b36e7bc49f4230f2a85d50d16050323"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
* main: (153 commits)
[Security Solution] {{state.signals_count}} Object not working (#156472) (#156707)
[Synthetics] refresh data on visualization scrubbing (#156777)
[RAM] Docs for slack improvements (#153885)
[RAM] Alert search bar only KQL (#155947)
[ML] Functional tests - stabilize export job tests (#156586)
[Saved Search] Update saved search schema to allow empty `sort` arrays (#156769)
[ML] Rename `curated` model type to `elastic` (#156684)
[Discover] Enable sharing for text based languages (#156652)
[api-docs] 2023-05-05 Daily api_docs build (#156781)
Upgrade EUI to v77.2.2 (#155208)
[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)
[DOCS] Case file attachments (#156459)
[D4C] additional error handling for 'block' action added + policy editor UI fixes (#156629)
[Enterprise Search] refactor(SearchApplications): rename telemetry ids (#156733)
[Enterprise Search] Add telemetry to ELSER deployment buttons + error (#156545)
[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)
[Logs onboarding] StepsFooter outside of main panel (#156686)
[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)
[Enterprise Search][Behavioral Analytics] Update formulas (#156704)
Add API Events to Endpoint Security Advanced Policy (#156718)
...
Addresses: #156352
Summary
This PR adds a migration to unmute all Security Solution's custom rules while migrating to Kibana
8.8. As we added support for rule snoozing in8.8https://github.com/elastic/security-team/issues/5308 users are able to manage muting of rule notifications. Prior8.8Security Solution's custom rules were muted under the hood if there is no actions.