-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Security Solution] Wait for Fleet setup completion in Cypress before running tests #230632
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
Conversation
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
cc @maximpn |
|
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) |
| * The message must not be filtered out by the logging configuration. Subsequently higher log level is better. | ||
| * "Fleet setup completed" has the same "info" level as "Kibana server is ready" log message. | ||
| */ | ||
| const FLEET_PLUGIN_READY_LOG_MESSAGE_REGEXP = /Fleet setup completed/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason to not reuse a single const for both API integration and Cypress tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simply didn't want to create constants file for a single constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested by running Cypress locally. Didn't notice any issues. Also running time on CI seems to be more or less the same as before. Let's merge and see if it helps.
daa279d to
1e5d052
Compare
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 https://github.com/elastic/kibana/actions/runs/16789469832 |
… 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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.
… 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.
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.