Skip to content

Commit

Permalink
Skip status updates on manual migrations in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Sep 9, 2020
1 parent e991629 commit 9042e0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,17 @@ export class KibanaMigrator {
Array<{ status: string }>
> {
if (this.migrationResult === undefined || rerun) {
this.status$.next({ status: 'running' });
// Reruns are only used by CI / EsArchiver. Publishing status updates on reruns results in slowing down CI
// unnecessarily, so we skip it in this case.
if (!rerun) {
this.status$.next({ status: 'running' });
}

this.migrationResult = this.runMigrationsInternal().then((result) => {
this.status$.next({ status: 'completed', result });
// Similar to above, don't publish status updates when rerunning in CI.
if (!rerun) {
this.status$.next({ status: 'completed', result });
}
return result;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/status/get_summary_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const getSummaryStatus = (
// TODO: include URL to status page
detail: `See the status page for more information`,
meta: {
affectedServices: Object.fromEntries([...highestStatuses]),
affectedServices: Object.fromEntries(highestStatuses),
},
};
}
Expand Down

0 comments on commit 9042e0f

Please sign in to comment.