-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Risk score test unskip and clear transform #168469
Conversation
…-ref HEAD~1..HEAD --fix'
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
As I mentioned in the comments, I think we should abstract those teardown functions into a named helper like cleanRiskEngine
and just call that before/after our tests.
I'm not sure if you intend to merge this PR, or open a new one; let me know and I can approve, though.
await cleanRiskEngineConfig({ kibanaServer }); | ||
await deleteRiskEngineTask({ es, log }); | ||
await deleteAllRiskScores(log, es); | ||
await clearTransforms({ | ||
es, | ||
log, | ||
}); | ||
}); |
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.
We should abstract this to a function named cleanRiskEngine({ kibanaServer, es, log })
@@ -45,10 +57,11 @@ export default ({ getService }: FtrProviderContext) => { | |||
supertest, | |||
log, | |||
}); | |||
await deleteRiskEngineTask({ es, log }); | |||
}); | |||
|
|||
// FLAKY: https://github.com/elastic/kibana/issues/168376 |
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.
Don't forget to delete these comments
es.indices.deleteDataStream({ name: [`risk-score.risk-score-${namespace}`] }), | ||
es.indices.delete({ | ||
index: [`risk-score.risk-score-latest-${namespace}`], | ||
}), | ||
]); | ||
log.info(result); |
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.
Was this just for debugging, or did you intend to leave this here?
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 see that you triggered a build shortly before I reviewed; since this is potentially blocking folks, let's just merge this with the outdated comments and without the refactor; we can do those in a followup 👍
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
@nkhristinin should this be backported to 8.11 to help with stability there? |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Risk score test unskip and clear transform Run 50 times and 100 times on flaky test runner and it was green --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Ryland Herrick <[email protected]> (cherry picked from commit caeae04)
# Backport This will backport the following commits from `main` to `8.11`: - [Risk score test unskip and clear transform (#168469)](#168469) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Khristinin Nikita","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-13T06:47:36Z","message":"Risk score test unskip and clear transform (#168469)\n\n# Risk score test unskip and clear transform \r\n\r\n\r\nRun 50 times and 100 times on flaky test runner and it was green\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Ryland Herrick <[email protected]>","sha":"caeae04fac6602d54a543ececa10fbd7c91ddd7c","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v8.12.0"],"number":168469,"url":"https://github.com/elastic/kibana/pull/168469","mergeCommit":{"message":"Risk score test unskip and clear transform (#168469)\n\n# Risk score test unskip and clear transform \r\n\r\n\r\nRun 50 times and 100 times on flaky test runner and it was green\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Ryland Herrick <[email protected]>","sha":"caeae04fac6602d54a543ececa10fbd7c91ddd7c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168469","number":168469,"mergeCommit":{"message":"Risk score test unskip and clear transform (#168469)\n\n# Risk score test unskip and clear transform \r\n\r\n\r\nRun 50 times and 100 times on flaky test runner and it was green\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Ryland Herrick <[email protected]>","sha":"caeae04fac6602d54a543ececa10fbd7c91ddd7c"}}]}] BACKPORT--> Co-authored-by: Khristinin Nikita <[email protected]>
# Risk score test unskip and clear transform Run 50 times and 100 times on flaky test runner and it was green --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Ryland Herrick <[email protected]>
## Summary Followup to some recent work to improve test reliability (namely #168469): * Consolidates teardown of risk engine artifacts into a single helper function * Removes references to flaky test issues in comments * Log utils errors at the warning level
Risk score test unskip and clear transform
Run 50 times and 100 times on flaky test runner and it was green