kibana/packages/core/saved-objects
Kibana Machine d3853f4789
[8.16] [SO migration] Move to previous step in update mappings wait when it fails with search_phase_execution_exception (#216693) (#217190)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[SO migration] Move to previous step in update mappings wait when it
fails with search_phase_execution_exception
(#216693)](https://github.com/elastic/kibana/pull/216693)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jesus
Wahrman","email":"41008968+jesuswr@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-04T13:37:06Z","message":"[SO
migration] Move to previous step in update mappings wait when it fails
with search_phase_execution_exception (#216693)\n\n##
Summary\n\nResolves
https://github.com/elastic/kibana/issues/207096\n\nThis continues the
work in https://github.com/elastic/kibana/pull/213979\n\nSometimes ES
returns a 200 response containing an error field when we\nwait for the
update mappings task. This case wasn't being handled. This\nPR handles
that case, when we find a `search_phase_execution_exception`\nin the ES
response we return a retryable error that sends us back to the\nupdate
mappings state. It does it for both migration algorithms, the\npriority
is ZDT but seemed like a nice to have in both.\n\n### Checklist\n\nCheck
the PR satisfies following conditions. \n\nReviewers should verify this
PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"49380143432b654cf1b849d8c77b3abc2fb3aeb4","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","backport:prev-major","backport:current-major","v9.1.0"],"title":"[SO
migration] Move to previous step in update mappings wait when it fails
with
search_phase_execution_exception","number":216693,"url":"https://github.com/elastic/kibana/pull/216693","mergeCommit":{"message":"[SO
migration] Move to previous step in update mappings wait when it fails
with search_phase_execution_exception (#216693)\n\n##
Summary\n\nResolves
https://github.com/elastic/kibana/issues/207096\n\nThis continues the
work in https://github.com/elastic/kibana/pull/213979\n\nSometimes ES
returns a 200 response containing an error field when we\nwait for the
update mappings task. This case wasn't being handled. This\nPR handles
that case, when we find a `search_phase_execution_exception`\nin the ES
response we return a retryable error that sends us back to the\nupdate
mappings state. It does it for both migration algorithms, the\npriority
is ZDT but seemed like a nice to have in both.\n\n### Checklist\n\nCheck
the PR satisfies following conditions. \n\nReviewers should verify this
PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"49380143432b654cf1b849d8c77b3abc2fb3aeb4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216693","number":216693,"mergeCommit":{"message":"[SO
migration] Move to previous step in update mappings wait when it fails
with search_phase_execution_exception (#216693)\n\n##
Summary\n\nResolves
https://github.com/elastic/kibana/issues/207096\n\nThis continues the
work in https://github.com/elastic/kibana/pull/213979\n\nSometimes ES
returns a 200 response containing an error field when we\nwait for the
update mappings task. This case wasn't being handled. This\nPR handles
that case, when we find a `search_phase_execution_exception`\nin the ES
response we return a retryable error that sends us back to the\nupdate
mappings state. It does it for both migration algorithms, the\npriority
is ZDT but seemed like a nice to have in both.\n\n### Checklist\n\nCheck
the PR satisfies following conditions. \n\nReviewers should verify this
PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"49380143432b654cf1b849d8c77b3abc2fb3aeb4"}}]}]
BACKPORT-->

Co-authored-by: Jesus Wahrman <41008968+jesuswr@users.noreply.github.com>
2025-04-04 16:44:48 +01:00
..
core-saved-objects-api-browser Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-api-server Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-api-server-internal Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-api-server-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-base-server-internal Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-base-server-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-browser Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-browser-internal Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-browser-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-common Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-import-export-server-internal [8.16] Fix issue with duplicate references in error object when copying saved objects to space (#200053) (#200600) 2024-11-18 11:38:07 -06:00
core-saved-objects-import-export-server-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-migration-server-internal [8.16] [SO migration] Move to previous step in update mappings wait when it fails with search_phase_execution_exception (#216693) (#217190) 2025-04-04 16:44:48 +01:00
core-saved-objects-migration-server-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-server Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-server-internal [8.x] Add logging to importer. Closes issue #192212 (#192234) (#195339) 2024-10-08 05:43:17 +02:00
core-saved-objects-server-mocks Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
core-saved-objects-utils-server Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
docs/openapi [8.16] [docs] Remove experimental message from saved objects import and export apis (#202173) (#202457) 2024-12-02 09:18:33 -06:00