-
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
Adds warning to the healthcheck when a migration is pending #30040
Conversation
Pinging @elastic/kibana-operations |
@chrisdavies, thoughts? |
7265cab
to
7a07570
Compare
Signed-off-by: Tyler Smalley <[email protected]>
7a07570
to
69da28f
Compare
💚 Build Succeeded |
|
||
if (server.kibanaMigrator && server.kibanaMigrator.hasMigrated === true) { | ||
const { migrationVersion } = server.kibanaMigrator.documentMigrator; | ||
const upTodate = await migrationsUpToDate(callWithInternalUser, kibanaIndex, migrationVersion, 1); |
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.
does it make sense to attach this to the kibanaMigrator class?
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.
Not sure what you mean. Do you mean move this logger logic into it or not use the kibanaMigrator 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.
migrationsUpToDate on the surface looks like something kibanaMigrator would expose but they're resolved differently (import vs exposed on server object). i see it's used via a static class instead, feel free to ignore
I wonder how expensive this check is? I'm not sure if we want to be doing it every 30 seconds, as I think it requires a full index scan. But I don't know much about this kind of thing. It's also going to be permanently spammy in the case that someone has applied an index template that affects Kibana's mappings. Maybe I should get this PR moving forward: #28252 Maybe we can make it a less-frequent check? |
What if this was done on status change from red to green instead of as a health check? |
💔 Build Failed |
Closing this for now. |
Since the index template was removed in #29268, we need to inform the user when they have done something to the index which requires a restart.
Here we wait until the migrations have been completed and check for pending required migrations with the health check.
To test you can delete the Kibana index after Kibana has started. You should begin to see warnings like the following:
This warning is currently limited to once every 30 seconds.