Skip to content
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

Conversation

markjhoy
Copy link
Contributor

@markjhoy markjhoy commented Feb 11, 2025

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.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Unit or functional tests were updated or added to match the most common scenarios
  • 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.
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@markjhoy markjhoy changed the title [DRAFT] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations [DRAFT] [8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations Feb 11, 2025
Copy link
Contributor

@jloleysens jloleysens left a 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.

@markjhoy
Copy link
Contributor Author

Overall this looks solid, we might want to get some @\elastic/kibana-docs review on the copy but first pass LGTM.

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

@markjhoy markjhoy added Team:EnterpriseSearch v8.18.0 release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting backport:8.18 v8.19.0 and removed backport:skip This commit does not require backporting labels Feb 12, 2025
@markjhoy markjhoy requested a review from jloleysens February 12, 2025 17:19
@markjhoy markjhoy changed the title [DRAFT] [8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations [8.x] Add Pre-8.x Enterprise Search Index Incompatibility Deprecations Feb 13, 2025
@markjhoy markjhoy marked this pull request as ready for review February 13, 2025 00:23
@markjhoy markjhoy requested a review from a team February 13, 2025 00:23
Copy link
Contributor

@jloleysens jloleysens left a 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!


router.post(
{
path: '/internal/enterprise_search/deprecations/set_enterprise_search_indices_read_only',
Copy link
Contributor

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!

Copy link
Contributor Author

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.

@markjhoy markjhoy requested a review from jloleysens February 13, 2025 14:19
Copy link
Contributor

@jloleysens jloleysens left a 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.

@jloleysens
Copy link
Contributor

@markjhoy when you merge this PR, would you mind also merge this, related one:

#210526

Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey left a 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.

Comment on lines 65 to 69
await Promise.all([
await getCrawlerDeprecations(ctx, docsUrl),
await getNativeConnectorDeprecations(ctx, hasAgentless, hasFleetServer, cloud, docsUrl),
await getEnterpriseSearchPre8IndexDeprecations(ctx, docsUrl, config.host),
]);
Copy link
Contributor

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.

Suggested change
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),
]);

Copy link
Contributor Author

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?)

@markjhoy markjhoy removed the backport:version Backport to applied version labels label Feb 13, 2025
@markjhoy markjhoy enabled auto-merge (squash) February 13, 2025 17:12
@markjhoy markjhoy merged commit 271e40e into elastic:8.x Feb 13, 2025
14 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@markjhoy
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

markjhoy added a commit to markjhoy/kibana that referenced this pull request Feb 13, 2025
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)
markjhoy added a commit that referenced this pull request Feb 13, 2025
…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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants