-
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
[tests/functional] catch and ignore errors during stabilization #11906
[tests/functional] catch and ignore errors during stabilization #11906
Conversation
jenkins, test this |
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.
This has been on my mind, so I'm glad we have this PR. Thanks, @spalger.
But, why do we have to wait for the config doc to be available in ES before it's considered stable, and therefore allowed to start? Is there a way to start up kibana without a .kibana? And just keep trying to create it in the background?
@@ -32,29 +32,36 @@ export function KibanaServerProvider({ getService }) { | |||
const startMs = Date.now(); | |||
const timeout = config.get('timeouts.kibanaStabilize'); | |||
|
|||
let exists; | |||
let state; |
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.
pulling these out does make sense.
@archanid we don't have to, with enough retries things will eventually stabilize because the Kibana server is continuously checking for the config doc and creating it (or the whole .kibana index) when necessary. Adding enough retries in the right place is the tricky part though, this just tries to make the baseline for tests a bit more predictable. |
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
return; | ||
} | ||
} catch (err) { | ||
log.warning(`Failed to check for kibana stabilization: ${err.stack}`); |
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.
makes a lot of sense
(cherry picked from commit eb31af6)
5.5/5.x: 0527267 |
The
kibanaServer
service in the functional tests has awaitForStabilization()
method that is called automatically before every test and tries to make sure that the kibana server isn't in a bad state before continuing. It does this by pinging the/api/status
route and checking for the config document in elasticsearch.A recent failure in the tests shows that elasticsearch responded with a 503 at this time, which is surprising but ultimately not something that should take down the
waitForStabilization()
method, so these changes update the method to catch and log/ignore errorsthrow
n during the check procedure.