Skip to content
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

Merged
merged 11 commits into from
Oct 21, 2024

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Oct 16, 2024

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.

@hop-dev hop-dev added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Entity Analytics Security Entity Analytics Team labels Oct 16, 2024
@hop-dev hop-dev self-assigned this Oct 16, 2024
@hop-dev hop-dev requested a review from a team as a code owner October 16, 2024 15:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@kibanamachine
Copy link
Contributor

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.
[❌] x-pack/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/configs/ess.config.ts: 92/100 tests passed.

see run history

@kibanamachine
Copy link
Contributor

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.

see run history

@hop-dev hop-dev enabled auto-merge (squash) October 17, 2024 12:28
let lastBody: any = null;
const delayMs = 2000;

while (attempts > 0) {
Copy link
Member

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:

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use utility functions.

@hop-dev hop-dev added v8.16.0 backport:version Backport to applied version labels v8.17.0 and removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 18, 2024
@kibanamachine
Copy link
Contributor

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.

see run history

@hop-dev hop-dev added the v9.0.0 label Oct 18, 2024
@hop-dev
Copy link
Contributor Author

hop-dev commented Oct 21, 2024

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @hop-dev

@hop-dev hop-dev merged commit 0e1b2a3 into elastic:main Oct 21, 2024
46 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11439185179

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.16 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 196564

Questions ?

Please refer to the Backport tool documentation

hop-dev added a commit to hop-dev/kibana that referenced this pull request Oct 21, 2024
… 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
@hop-dev
Copy link
Contributor Author

hop-dev commented Oct 21, 2024

💚 All backports created successfully

Status Branch Result
8.x
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

hop-dev added a commit to hop-dev/kibana that referenced this pull request Oct 21, 2024
… 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
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 23, 2024
@kibanamachine
Copy link
Contributor

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.

hop-dev added a commit that referenced this pull request Oct 23, 2024
…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-->
hop-dev added a commit that referenced this pull request Oct 23, 2024
…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-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment