-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Fleet] fix setup error during test #120917
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
Pinging @elastic/fleet (Team:Fleet) |
@@ -341,7 +341,7 @@ export async function ensureDefaultComponentTemplate( | |||
await putComponentTemplate(esClient, logger, { |
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.
putComponentTemplate
is not returning a promise, but an object containing clusterPromise
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.
Good catch 🚀
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
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.
LGTM! Nice catch!
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Summary
Fixing flaky tests caused by error in fleet setup after stop is invoked
#118626
#120840
The culprit was a missing await of a promise inside setup.
I could simulate this locally by adding a mockFunction in putComponentTemplate to return a Promise.reject:
In kibana logs verified that server doesn't crash on this error like before, and
Fleet setup failed
is logged.