[9.2] [Security Solution][Cypress] Fix flaky related integrations test caused by Fleet race condition (#261128)#262482
Open
kibanamachine wants to merge 1 commit intoelastic:9.2from
Open
Conversation
…ed by Fleet race condition (elastic#261128) **Resolves: elastic#259831 **Resolves: elastic#239356 ## Summary Mitigates chances of `related_integrations.cy.ts` failure by reducing pressure on Kibana's Fleet plugin via adding extra waiting for integrations installation before adding agent policies. Generally this mitigates the risk of failure. ## Details Mitigates `related_integrations.cy.ts` flakiness reasons in the suite where `cy.request()` timed out waiting for `POST /api/fleet/agent_policies?sys_monitoring=true`. **Root cause**: `installIntegrations()` fired the bulk package install request and immediately followed with the agent policy creation request. The Fleet bulk install endpoint returns a response once the request is accepted, but processes package assets asynchronously. Under CI load, Fleet was still indexing large packages (`aws`, `system`) when the agent policy POST arrived, causing the API to become unresponsive and exceed the 30s default timeout. **Fix**: - Chain the agent policy creation inside `.then()` after the bulk install, polling `waitForPackageInstalled` for each package before proceeding. - Increase the agent policy creation timeout from 30s to 60s, as this endpoint is inherently slow with `?sys_monitoring=true`. ## Flaky test runner TBD Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 4aefe9c)
Contributor
⏳ Build in-progress, with failures
Failed CI Stepscc @maximpn |
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
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.2:Questions ?
Please refer to the Backport tool documentation