-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[9.0] [Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338) #230412
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
Merged
kibanamachine
merged 1 commit into
elastic:9.0
from
kibanamachine:backport/9.0/pr-230338
Aug 4, 2025
Merged
[9.0] [Security Solution] Wait for Fleet plugin setup completion in Rule Management integration tests (#230338) #230412
kibanamachine
merged 1 commit into
elastic:9.0
from
kibanamachine:backport/9.0/pr-230338
Aug 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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)
maximpn
added a commit
that referenced
this pull request
Aug 5, 2025
…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-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation