Fixing isMigrated bug, when migrations failed we incorrectly ignored it. (#37674) (#38042)

Prior to this change, when migrations failed (for example when a
.kibana_1 index already exists and no alias does) the awaitMigration
promise would resolve incorrectly. This allowed subsequent plugins,
including Spaces, to proceed using the SavedObjectsClient/Repository
to create documents. This commonly caused a .kibana index to be created,
which would then block the creation of a .kibana alias, and everything
would grind to a halt.
This commit is contained in:
Brandon Kobel 2019-06-04 16:12:24 -07:00 committed by GitHub
parent 5841467b6e
commit 990657c72b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ export class IndexMigrator {
pollInterval: context.pollInterval,
async isMigrated() {
return requiresMigration(context);
return !(await requiresMigration(context));
},
async runMigration() {