-
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
[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations #210688
[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations #210688
Conversation
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.
Overall this looks solid, we might want to get some @\elastic/kibana-docs review on the copy but first pass LGTM.
...solutions/search/plugins/enterprise_search/server/deprecations/pre_eight_index_deprecator.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/search/plugins/enterprise_search/server/deprecations/index.ts
Outdated
Show resolved
Hide resolved
Thanks! I'll be finishing this up ASAP - I've been able to test locally, and I think all that's left is unit tests |
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.
Looks good @markjhoy !
I left a few comments, main one I'd like to get your 👀 on is the one about
1 data stream may have 1+ 7.x indices...unnecesary rollovers
Otherwise this looks good to go!
x-pack/solutions/search/plugins/enterprise_search/server/deprecations/index.test.ts
Outdated
Show resolved
Hide resolved
...solutions/search/plugins/enterprise_search/server/deprecations/pre_eight_index_deprecator.ts
Outdated
Show resolved
Hide resolved
...solutions/search/plugins/enterprise_search/server/deprecations/pre_eight_index_deprecator.ts
Show resolved
Hide resolved
|
||
router.post( | ||
{ | ||
path: '/internal/enterprise_search/deprecations/set_enterprise_search_indices_read_only', |
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.
Because this route now has another side effect: calling rollover on data streams (to create a new write index). There is a possibility of concurrency issues: what happens when this gets called 2-3 times quickly? We will end up with quite a few more rollovers than needed.
I think, overall, this risk is fairly low and to address this would be more complex. I just wanted to point out that even in a single Kibana situation this is currently not an atomic operation. Let me know what you think!
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.
Thanks for pointing this out - I think with a fix for the above (calling rollover on the same datastream name multiple times) will help alleviate this.
...k/solutions/search/plugins/enterprise_search/server/routes/enterprise_search/deprecations.ts
Show resolved
Hide resolved
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.
Thanks for addressing my feedback! Did not test this locally.
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.
one small change but overall this seems fine.
await Promise.all([ | ||
await getCrawlerDeprecations(ctx, docsUrl), | ||
await getNativeConnectorDeprecations(ctx, hasAgentless, hasFleetServer, cloud, docsUrl), | ||
await getEnterpriseSearchPre8IndexDeprecations(ctx, docsUrl, config.host), | ||
]); |
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.
sorry I missed this in the original PR but these inner awaits
should not be here.
await Promise.all([ | |
await getCrawlerDeprecations(ctx, docsUrl), | |
await getNativeConnectorDeprecations(ctx, hasAgentless, hasFleetServer, cloud, docsUrl), | |
await getEnterpriseSearchPre8IndexDeprecations(ctx, docsUrl, config.host), | |
]); | |
await Promise.all([ | |
getCrawlerDeprecations(ctx, docsUrl), | |
getNativeConnectorDeprecations(ctx, hasAgentless, hasFleetServer, cloud, docsUrl), | |
getEnterpriseSearchPre8IndexDeprecations(ctx, docsUrl, config.host), | |
]); |
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.
Thanks @TattdCodeMonkey - Just to be sure (and for my own education too) - with the awaits
there, basically, this will wait for each one, in sequence, to complete before creating a promise with all the completed tasks... when, what should be is that the await Promise.all
call will itself wait for all the promises to be resolved before completing... correct? (i.e. without the individual await
keywords for each of the async functions, those functions can essentially run in parallel... whereas as the moment, they will not... correct?)
…arch_deprecation_set_read_only_indices' into markjhoy/add_ent_search_deprecation_set_read_only_indices
💚 Build Succeeded
Metrics [docs]
History
|
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
elastic#210688) ## Summary Adds deprecations for the Kibana Upgrade Assistant if Enterprise Search indices from pre version 8.x are found. These indices are not compatible to upgrade to 9.x, so they must be set to read only or deleted. The deprecations call out the specific indices, and offers a "quick resolve" button to set the affected indices to read only. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 271e40e)
…ecations (#210688) (#211077) # Backport This will backport the following commits from `8.x` to `8.18`: - [[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations (#210688)](#210688) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Mark J. Hoy","email":"mark.hoy@elastic.co"},"sourceCommit":{"committedDate":"2025-02-13T18:21:48Z","message":"[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations (#210688)\n\n## Summary\r\n\r\nAdds deprecations for the Kibana Upgrade Assistant if Enterprise Search\r\nindices from pre version 8.x are found. These indices are not compatible\r\nto upgrade to 9.x, so they must be set to read only or deleted.\r\n\r\nThe deprecations call out the specific indices, and offers a \"quick\r\nresolve\" button to set the affected indices to read only.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"271e40e9753417bb083748017aa7fa528fc34510","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Upgrade Assistant","Team:EnterpriseSearch","v8.18.0","v8.19.0","backport:8.18"],"title":"[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations","number":210688,"url":"https://github.com/elastic/kibana/pull/210688","mergeCommit":{"message":"[8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations (#210688)\n\n## Summary\r\n\r\nAdds deprecations for the Kibana Upgrade Assistant if Enterprise Search\r\nindices from pre version 8.x are found. These indices are not compatible\r\nto upgrade to 9.x, so they must be set to read only or deleted.\r\n\r\nThe deprecations call out the specific indices, and offers a \"quick\r\nresolve\" button to set the affected indices to read only.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"271e40e9753417bb083748017aa7fa528fc34510"}},"sourceBranch":"8.x","suggestedTargetBranches":["8.18"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
Adds deprecations for the Kibana Upgrade Assistant if Enterprise Search indices from pre version 8.x are found. These indices are not compatible to upgrade to 9.x, so they must be set to read only or deleted.
The deprecations call out the specific indices, and offers a "quick resolve" button to set the affected indices to read only.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelines