-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup #196564
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7154[❌] x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/configs/serverless.config.ts: 73/100 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7156[✅] x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/configs/ess.config.ts: 200/200 tests passed. |
let lastBody: any = null; | ||
const delayMs = 2000; | ||
|
||
while (attempts > 0) { |
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.
There is a utility for this here:
kibana/x-pack/test/common/utils/security_solution/detections_response/wait_for.ts
Line 11 in f4f71d1
export const waitFor = async ( |
And there is also a retry
service available but I've never used it. const retry = getService('retry');
delayMs: number = 2000 | ||
) => { | ||
let currentAttempt = 1; | ||
while (currentAttempt <= attempts) { |
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.
Please use utility functions.
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7173[✅] x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/configs/ess.config.ts: 200/200 tests passed. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
cc @hop-dev |
Starting backport for target branches: 8.16, 8.x |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
… setup (elastic#196564) ## Summary Closes elastic#196546 Closes elastic#196526 Unskips flaky entity store tests after fixes. Entity store tests were not polling for the engine to be started before asserting the assets were present. I have also added some retries to the asset checks as some assets are not immediately queryable after creation. (cherry picked from commit 0e1b2a3) # Conflicts: # x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/engine.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… setup (elastic#196564) ## Summary Closes elastic#196546 Closes elastic#196526 Unskips flaky entity store tests after fixes. Entity store tests were not polling for the engine to be started before asserting the assets were present. I have also added some retries to the asset checks as some assets are not immediately queryable after creation. (cherry picked from commit 0e1b2a3) # Conflicts: # x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts # x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/engine.ts
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…ted on setup (#196564) (#197050) # Backport This will backport the following commits from `main` to `8.x`: - [[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)](#196564) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mark Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T11:31:00Z","message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Team:Entity Analytics","v8.16.0","backport:version","v8.17.0"],"number":196564,"url":"https://github.com/elastic/kibana/pull/196564","mergeCommit":{"message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196564","number":196564,"mergeCommit":{"message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…rted on setup (#196564) (#197053) # Backport This will backport the following commits from `main` to `8.16`: - [[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)](#196564) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mark Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T11:31:00Z","message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Team:Entity Analytics","v8.16.0","backport:version","v8.17.0"],"number":196564,"url":"https://github.com/elastic/kibana/pull/196564","mergeCommit":{"message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196564","number":196564,"mergeCommit":{"message":"[Entity Store] [FTR Tests] Fix flakiness + poll for engine started on setup (#196564)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/196546\r\nCloses https://github.com/elastic/kibana/issues/196526\r\n\r\nUnskips flaky entity store tests after fixes. \r\n\r\nEntity store tests were not polling for the engine to be started before\r\nasserting the assets were present.\r\n\r\nI have also added some retries to the asset checks as some assets are\r\nnot immediately queryable after creation.","sha":"0e1b2a3663d5a277247c74ed0957c00cffd4b0a0"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
Closes #196546
Closes #196526
Unskips flaky entity store tests after fixes.
Entity store tests were not polling for the engine to be started before asserting the assets were present.
I have also added some retries to the asset checks as some assets are not immediately queryable after creation.