[Security Solution] Unskip prebuilt rules bundled package integration tests#227371
Conversation
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8579[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/ess_air_gapped.config.ts: 200/200 tests passed. |
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
| await deletePrebuiltRulesFleetPackage({ es, supertest, retryService: retry, log }); | ||
| }); | ||
|
|
||
| it('should list `security_detection_engine` as a bundled fleet package in the `fleet_package.json` file', async () => { |
There was a problem hiding this comment.
Noticed that assertion on line 54
expect(securityDetectionEnginePackage?.name).toBe('security_detection_engine');seems to be unnecessary since it's kind of covered by assertion on line 52
expect(securityDetectionEnginePackage).not.toBeUndefined();There was a problem hiding this comment.
Indeed, this assertion looks redundant. I simply didn't touch them. But it makes sense to simplify the assertions in the scope of this PR.
nikitaindik
left a comment
There was a problem hiding this comment.
Please help me understand. Is this what seems to be happening here?
- Some previous test installs the package, but removes all of its assets.
- In this test, we attempt to install the package, but the installation is skipped since the package is already installed (though empty).
- We expect to have installable rules, but we get zero since the package is empty and this asserting fails:
expect(statusAfterPackageInstallation.stats.num_prebuilt_rules_to_install).toBeGreaterThan(0) 97b0187 to
ed64b0c
Compare
|
@nikitaindik I've addressed your comment. Could you have a look? |
Yes. This is correct. It's dependency in the previous test suits. Each test should prepare the environment for its flawless execution. In that particular case removing all prebuilt rule assets doesn't lead to removing Fleet's SO. We the test tried to install the package Fleet sees there is an SO matching this package and doesn't install prebuilt rule assets for the package. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @maximpn |
nikitaindik
left a comment
There was a problem hiding this comment.
Thanks, LGTM now! In the future we might want to add a utility function that removes both the package and its contents: basically calls both deleteAllPrebuiltRuleAssets and deletePrebuiltRulesFleetPackage.
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 https://github.com/elastic/kibana/actions/runs/16219987944 |
… tests (elastic#227371) **Resolves: elastic#180087 ## Summary This PR fixes and unskips Prebuilt Rules bundled package integration tests. ## Details Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579) (cherry picked from commit c43d8cc)
… tests (elastic#227371) **Resolves: elastic#180087 ## Summary This PR fixes and unskips Prebuilt Rules bundled package integration tests. ## Details Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579) (cherry picked from commit c43d8cc)
… tests (elastic#227371) **Resolves: elastic#180087 ## Summary This PR fixes and unskips Prebuilt Rules bundled package integration tests. ## Details Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579) (cherry picked from commit c43d8cc)
… tests (elastic#227371) **Resolves: elastic#180087 ## Summary This PR fixes and unskips Prebuilt Rules bundled package integration tests. ## Details Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579) (cherry picked from commit c43d8cc)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ration tests (#227371) (#227646) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)](#227371) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-11T12:26:23Z","message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution] Unskip prebuilt rules bundled package integration tests","number":227371,"url":"https://github.com/elastic/kibana/pull/227371","mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227371","number":227371,"mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…gration tests (#227371) (#227645) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)](#227371) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-11T12:26:23Z","message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution] Unskip prebuilt rules bundled package integration tests","number":227371,"url":"https://github.com/elastic/kibana/pull/227371","mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227371","number":227371,"mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…ration tests (#227371) (#227647) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)](#227371) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-11T12:26:23Z","message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution] Unskip prebuilt rules bundled package integration tests","number":227371,"url":"https://github.com/elastic/kibana/pull/227371","mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227371","number":227371,"mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…gration tests (#227371) (#227644) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)](#227371) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-11T12:26:23Z","message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution] Unskip prebuilt rules bundled package integration tests","number":227371,"url":"https://github.com/elastic/kibana/pull/227371","mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227371","number":227371,"mergeCommit":{"message":"[Security Solution] Unskip prebuilt rules bundled package integration tests (#227371)\n\n**Resolves: https://github.com/elastic/kibana/issues/180087**\n\n## Summary\n\nThis PR fixes and unskips Prebuilt Rules bundled package integration tests.\n\n## Details\n\nFlakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)","sha":"c43d8ccfbdbf0a25b07db34d71f160a239fa858c"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
… tests (elastic#227371) **Resolves: elastic#180087 ## Summary This PR fixes and unskips Prebuilt Rules bundled package integration tests. ## Details Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8579)
Resolves: #180087
Summary
This PR fixes and unskips Prebuilt Rules bundled package integration tests.
Details
Flakiness was caused by improper test setup which failed to remove already installed prebuilt rules package.
Flaky test runner