Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.8] [Migrations] Systematically wait for newly created indices to t…
…urn green (#157973) (#157993) # Backport This will backport the following commits from `main` to `8.8`: - [[Migrations] Systematically wait for newly created indices to turn green (#157973)](#157973) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-17T13:34:51Z","message":"[Migrations] Systematically wait for newly created indices to turn green (#157973)\n\nTackles https://github.com/elastic/kibana/issues/157968\r\n\r\nWhen creating new indices during SO migrations, we used to rely on the\r\n`res.acknowledged && res.shardsAcknowledged` of the\r\n`esClient.indices.create(...)` to determine that the indices are ready\r\nto use.\r\n\r\nHowever, we believe that due to certain race conditions, this can cause\r\nKibana migrations to fail (refer to the [related\r\nissue](https://github.com/elastic/kibana/issues/157968)).\r\n\r\nThis PR aims at fixing recent CI failures by adding a systematic\r\n`waitForIndexStatus` after creating an index.","sha":"71125b192e86ddc3d6747c5b14b92e669eba360f","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:skip","Feature:Migrations","backport:prev-minor","v8.8.0","v8.9.0","v8.8.1"],"number":157973,"url":"https://github.com/elastic/kibana/pull/157973","mergeCommit":{"message":"[Migrations] Systematically wait for newly created indices to turn green (#157973)\n\nTackles https://github.com/elastic/kibana/issues/157968\r\n\r\nWhen creating new indices during SO migrations, we used to rely on the\r\n`res.acknowledged && res.shardsAcknowledged` of the\r\n`esClient.indices.create(...)` to determine that the indices are ready\r\nto use.\r\n\r\nHowever, we believe that due to certain race conditions, this can cause\r\nKibana migrations to fail (refer to the [related\r\nissue](https://github.com/elastic/kibana/issues/157968)).\r\n\r\nThis PR aims at fixing recent CI failures by adding a systematic\r\n`waitForIndexStatus` after creating an index.","sha":"71125b192e86ddc3d6747c5b14b92e669eba360f"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157973","number":157973,"mergeCommit":{"message":"[Migrations] Systematically wait for newly created indices to turn green (#157973)\n\nTackles https://github.com/elastic/kibana/issues/157968\r\n\r\nWhen creating new indices during SO migrations, we used to rely on the\r\n`res.acknowledged && res.shardsAcknowledged` of the\r\n`esClient.indices.create(...)` to determine that the indices are ready\r\nto use.\r\n\r\nHowever, we believe that due to certain race conditions, this can cause\r\nKibana migrations to fail (refer to the [related\r\nissue](https://github.com/elastic/kibana/issues/157968)).\r\n\r\nThis PR aims at fixing recent CI failures by adding a systematic\r\n`waitForIndexStatus` after creating an index.","sha":"71125b192e86ddc3d6747c5b14b92e669eba360f"}}]}] BACKPORT--> Co-authored-by: Gerard Soldevila <[email protected]>
- Loading branch information