-
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
Add reindex feature to Upgrade Assistant #27457
Conversation
💔 Build Failed |
53cf03c
to
262adc2
Compare
💔 Build Failed |
262adc2
to
639529c
Compare
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
a55c278
to
3b5fa5b
Compare
💔 Build Failed |
3b5fa5b
to
39cb4bb
Compare
💚 Build Succeeded |
💔 Build Failed |
1ecdcb5
to
d838ff5
Compare
💔 Build Failed |
d838ff5
to
85ee5dc
Compare
💔 Build Failed |
retest |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
df028d3
to
34cc97d
Compare
💚 Build Succeeded |
💔 Build Failed |
7487b0e
to
4ca7c52
Compare
💔 Build Failed |
@jbudz i18n is going to be in a follow-up PR. Want to get this in and forward-ported to master so that we can complete work for APM in 7.0 |
Is it expected for a new template put every second? The polling is updating .kibana?
|
When I looked into this before, I found that this is from the current behavior of the Saved Object Service that @chrisdavies wants to remove in 7.0. |
Might be useful to select multiple indices at once, e.g. I have 30 filebeat-* indices with the same format and want to queue them all (flyout clicks can make it sorta slow). Not worried about this just noting at I go through things |
Pardon my noobishness: if I wanted to test this out (locally, for reporting purposes), would the required steps be:
|
@joelgriffith Mostly right. You'll want to spin up 6.7 (this is on 6.x branch right now) and go to Management > 7.0 Upgrade Assistant > Indices to find the UI. |
💔 Build Failed |
💔 Build Failed |
throw new Error(`Indices with more than one mapping type are not supported in 7.0.`); | ||
} | ||
|
||
return mappings[mappingTypes[0]]; |
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.
In 7.0 we will want to add a warning for types which are not _doc
and enforce on re-indexing.
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.
Should be easy enough, I can create a follow up PR for 7.0 after this gets merged.
💔 Build Failed |
💚 Build Succeeded |
I have gone through the code and done some pretty extensive functional testing on this PR, including adding a feature to tag and re-index APM specific indices. There are a few things left outstanding which will be handled in follow-up PR's.
|
Sorry for the massive delay @joshdover, but I was able to test this with some confidence locally! I think you're good to proceed |
💔 Build Failed |
95c76a3
to
f4342df
Compare
💚 Build Succeeded |
* Fixup saved objects * WIP reindex state machine * WIP UI * Separate status from current step * Add error messages * Copy types to CallWithInternalUser * Use backend worker * Add progress bar for large indices * Cleanup worker implementation * Add tests for ReindexService * Fix types * Fix CI * Add support for mapping coerced boolean fields * Add basic functional integration test * Cleanup reindexing backend, add more checks * Cleanup frontend code and add tests * Support removal of _default_ mapping + add tests * Add reindex warnings to reindex service * Add confirmation modal for reindex warnings * Cleanup flyout appearance * Generate new index name intelligently * Design tweaks * Show reindex button in both grouping modes * Add data archive integration tests * Change flyout design to two step process * Reorganize flyout files * Use custom steps component * Allow writes to indices if anything fails * Misc cleanup * Design edits * Only show warnings panel when reindex has not begun * Fix types * Handle moving existing aliases * Move integration tests to separate config * Fix ReindexButton bugs when changing pages * Fix polling service tests * Refactor ReindexService and ML handling (backend only) * Add credential caching and paused state to backend * Add paused state to frontend * Fix ts errors * Update copy * Add check for node version before ML step * Update data archive format * Update snapshots for React upgrade * Handle _default_ mappings correctly in warning checks * Use hashed state of reindex operation for credential storage * Address tyler's comments * Add watcher stop/starting * Use json-stable-stringify and sha256 for CredentialStore * Add types for json-stable-stringify
Summary
Related to #26368
Fixes #18469
This PR introduces the MVP reindexing feature to the 7.0 Upgrade Assistant.
Scope
This first iteration includes the following features:
In a second PR to be merged in for 6.7 I will add:
Automatic index changes
There are two key situations that we are going to handle for the cluster admin automatically:
_all
meta field from mappingsWhy are we doing this?
_all
meta field. Because of this, we expect this to be a very common issue when reindexing 5.x indices.Both of these changes are potentially breaking changes depending on the index is being used. Before starting a reindex on an index that has either of these problems, the UI alerts the user of the issue, how we handle it, and how it may affect any applications or scripts using this index (see screenshot below). We also require that the user go through a second confirmation before starting the reindex.
Screenshots
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers