-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests #230338
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] Wait for Fleet plugin setup completion in Rule Management integration tests #230338
Conversation
daa6778 to
3e4355b
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8993[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/edge_cases/ess_air_gapped_with_bundled_packages.config.ts: 200/200 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8995[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/edge_cases/ess_air_gapped_with_bundled_packages.config.ts: 200/200 tests passed. |
3e4355b to
4ac3466
Compare
|
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) |
…ule Management integration tests (#230338) (#230412) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)](#230338) <!--- 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-08-04T12:27:19Z","message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests","number":230338,"url":"https://github.com/elastic/kibana/pull/230338","mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230338","number":230338,"mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…Rule Management integration tests (#230338) (#230411) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)](#230338) <!--- 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-08-04T12:27:19Z","message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests","number":230338,"url":"https://github.com/elastic/kibana/pull/230338","mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230338","number":230338,"mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…Rule Management integration tests (#230338) (#230410) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)](#230338) <!--- 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-08-04T12:27:19Z","message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests","number":230338,"url":"https://github.com/elastic/kibana/pull/230338","mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230338","number":230338,"mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…nagement integration tests (elastic#230338) **Resolves: elastic#228844 **Resolves: elastic#229297 **Relates to: elastic#230363 ## Summary This PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic. ## Details Investigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet "thinks" the package was installed some time ago and required re-installation. There is a Fleet bug ticket describing this issue. This fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)
|
This PR is awesome, thank you @maximpn! |
…nagement integration tests (elastic#230338) **Resolves: elastic#228844 **Resolves: elastic#229297 **Relates to: elastic#230363 ## Summary This PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic. ## Details Investigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet "thinks" the package was installed some time ago and required re-installation. There is a Fleet bug ticket describing this issue. This fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999) (cherry picked from commit 2250c52)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ule Management integration tests (#230338) (#230573) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)](#230338) <!--- Backport version: 10.0.1 --> ### 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-08-04T12:27:19Z","message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests","number":230338,"url":"https://github.com/elastic/kibana/pull/230338","mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230338","number":230338,"mergeCommit":{"message":"[Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338)\n\n**Resolves: https://github.com/elastic/kibana/issues/228844**\n**Resolves: https://github.com/elastic/kibana/issues/229297**\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n\n## Summary\n\nThis PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.\n\n## Details\n\nInvestigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet \"thinks\" the package was installed some time ago and required re-installation.\n\nThere is a Fleet bug ticket describing this issue.\n\nThis fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.\n\n## Flaky test runner\n\n- ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)","sha":"2250c52fa0b5fb0e5c923cc5643f10de4e9fa357"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/230412","number":230412,"state":"MERGED","mergeCommit":{"sha":"09459eaf0a2e8e59c363e67387e535396922521f","message":"[9.0] [Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338) (#230412)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Security Solution] Wait for Fleet plugin setup completion in Rule\nManagement integration tests\n(#230338)](https://github.com/elastic/kibana/pull/230338)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/230410","number":230410,"state":"MERGED","mergeCommit":{"sha":"8b9a3e7b36e1c7e21434fc46a686c511d29afc4f","message":"[8.18] [Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338) (#230410)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.18`:\n- [[Security Solution] Wait for Fleet plugin setup completion in Rule\nManagement integration tests\n(#230338)](https://github.com/elastic/kibana/pull/230338)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/230411","number":230411,"state":"MERGED","mergeCommit":{"sha":"d02d0445f542f69a3f6a92c0525df1340e30f63a","message":"[8.19] [Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338) (#230411)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.19`:\n- [[Security Solution] Wait for Fleet plugin setup completion in Rule\nManagement integration tests\n(#230338)](https://github.com/elastic/kibana/pull/230338)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>"}}]}] BACKPORT-->
…nagement integration tests (elastic#230338) **Resolves: elastic#228844 **Resolves: elastic#229297 **Relates to: elastic#230363 ## Summary This PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic. ## Details Investigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet "thinks" the package was installed some time ago and required re-installation. There is a Fleet bug ticket describing this issue. This fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)
… running tests (#230632) **Relates to: #230363 **Relates to: #230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in #230363.
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363. (cherry picked from commit 649c0dc)
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363. (cherry picked from commit 649c0dc)
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363. (cherry picked from commit 649c0dc)
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363. (cherry picked from commit 649c0dc)
…before running tests (#230632) (#230886) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)](#230632) <!--- 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-08-06T21:52:25Z","message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests","number":230632,"url":"https://github.com/elastic/kibana/pull/230632","mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230632","number":230632,"mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
… before running tests (#230632) (#230884) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)](#230632) <!--- 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-08-06T21:52:25Z","message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests","number":230632,"url":"https://github.com/elastic/kibana/pull/230632","mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230632","number":230632,"mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
…before running tests (#230632) (#230885) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)](#230632) <!--- 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-08-06T21:52:25Z","message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests","number":230632,"url":"https://github.com/elastic/kibana/pull/230632","mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230632","number":230632,"mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
… before running tests (#230632) (#230883) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)](#230632) <!--- 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-08-06T21:52:25Z","message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests","number":230632,"url":"https://github.com/elastic/kibana/pull/230632","mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230632","number":230632,"mergeCommit":{"message":"[Security Solution] Wait for Fleet setup completion in Cypress before running tests (#230632)\n\n**Relates to: https://github.com/elastic/kibana/issues/230363**\n**Relates to: https://github.com/elastic/kibana/pull/230338**\n\n## Summary\n\nThis PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to #230338 used in our integration tests.\n\nFleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in https://github.com/elastic/kibana/issues/230363.","sha":"649c0dcea513a85f5ff04627c6f837f12b57199e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363.
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363.
…nagement integration tests (elastic#230338) **Resolves: elastic#228844 **Resolves: elastic#229297 **Relates to: elastic#230363 ## Summary This PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic. ## Details Investigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example `security_detection_engine`) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet "thinks" the package was installed some time ago and required re-installation. There is a Fleet bug ticket describing this issue. This fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area. ## Flaky test runner - ✅ [200 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8999)
… running tests (elastic#230632) **Relates to: elastic#230363 **Relates to: elastic#230338 ## Summary This PR makes sure Cypress e2e test run after Fleet setup is finished. This approach is similar to elastic#230338 used in our integration tests. Fleet setup running concurrently to the tests may cause tests flakiness. This behavior is described in elastic#230363.
Resolves: #228844
Resolves: #229297
Resolves: #229490
Relates to: #230363
Summary
This PR fixes integration tests flakiness caused by a race condition with the Fleet setup logic.
Details
Investigation of the related flaky integration tests has revealed that Fleet's setup logic (usually executed upon Kibana startup) performs installed packages re-installation. However, Fleet allows to make API calls like install a package. Subsequently some package (for example
security_detection_engine) might be installed before Fleet's setup logic completed. In particular a package installation API call leads to creation of package installation SO which is read by Fleet's setup logic. So Fleet "thinks" the package was installed some time ago and required re-installation.There is a Fleet bug ticket describing this issue.
This fix in this PR just wait for Fleet plugin to finish setup before running integration tests for Rule Management area.
Flaky test runner