-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Add reindex feature to Upgrade Assistant #27457
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
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
dac2e90
Fixup saved objects
joshdover 0fef9fa
WIP reindex state machine
joshdover e3e0a2d
WIP UI
joshdover ff3ff83
Separate status from current step
joshdover 2b94b32
Add error messages
joshdover 20c0c90
Copy types to CallWithInternalUser
joshdover b5e3fd0
Use backend worker
joshdover b4831c6
Add progress bar for large indices
joshdover 13eaad5
Cleanup worker implementation
joshdover 30a1f61
Add tests for ReindexService
joshdover 1c93f89
Fix types
joshdover 5bb7de9
Fix CI
joshdover 20d977d
Add support for mapping coerced boolean fields
joshdover 5267bd9
Add basic functional integration test
joshdover c2aa2f0
Cleanup reindexing backend, add more checks
joshdover fb89604
Cleanup frontend code and add tests
joshdover 5124db1
Support removal of _default_ mapping + add tests
joshdover a9256d1
Add reindex warnings to reindex service
joshdover 2eb5bc6
Add confirmation modal for reindex warnings
joshdover 00433d5
Cleanup flyout appearance
joshdover 0c43c0e
Generate new index name intelligently
joshdover eb7af00
Design tweaks
joshdover 4c1a3a2
Add data archive integration tests
joshdover 7b9a61b
Change flyout design to two step process
joshdover 9bd4db4
Reorganize flyout files
joshdover 1ea9a4b
Use custom steps component
joshdover b7525f3
Allow writes to indices if anything fails
joshdover e5c9fc0
Show reindex button in both grouping modes
joshdover 97ccb2e
Misc cleanup
joshdover 9bdf1f0
Design edits
cchaos 2727ae0
Only show warnings panel when reindex has not begun
joshdover daf9f79
Fix types
joshdover fdc11df
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover 415dc7c
Handle moving existing aliases
joshdover 1df22cd
Move integration tests to separate config
joshdover 4e1c29e
Fix ReindexButton bugs when changing pages
joshdover ba8206a
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover c4a2a48
Fix polling service tests
joshdover 74be0a2
Refactor ReindexService and ML handling (backend only)
joshdover 1d1afe8
Add credential caching and paused state to backend
joshdover 363485a
Add paused state to frontend
joshdover 7dc526b
Fix ts errors
joshdover b4fd5db
Update copy
joshdover d24f935
Add check for node version before ML step
joshdover b56edfc
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover a7b6bd7
Update data archive format
joshdover 465596e
Update snapshots for React upgrade
joshdover fa9d1b9
Handle _default_ mappings correctly in warning checks
joshdover 885c961
Use hashed state of reindex operation for credential storage
joshdover 6dda2b3
Address tyler's comments
joshdover 098a02c
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover adc7188
Add watcher stop/starting
joshdover 609f412
Use json-stable-stringify and sha256 for CredentialStore
joshdover 80e31f3
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover 574ed90
Add types for json-stable-stringify
joshdover f4342df
Merge remote-tracking branch 'upstream/6.x' into upgrade-checkup-reindex
joshdover File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import { | ||
| SavedObject, | ||
| SavedObjectAttributes, | ||
| } from 'src/server/saved_objects/service/saved_objects_client'; | ||
|
|
||
| export enum ReindexStep { | ||
| // Enum values are spaced out by 10 to give us room to insert steps in between. | ||
| created = 0, | ||
| indexConsumersStopped = 10, | ||
| readonly = 20, | ||
| newIndexCreated = 30, | ||
| reindexStarted = 40, | ||
| reindexCompleted = 50, | ||
| aliasCreated = 60, | ||
| indexConsumersStarted = 70, | ||
| } | ||
|
|
||
| export enum ReindexStatus { | ||
| inProgress, | ||
| completed, | ||
| failed, | ||
| paused, | ||
| } | ||
|
|
||
| export const REINDEX_OP_TYPE = 'upgrade-assistant-reindex-operation'; | ||
| export interface ReindexOperation extends SavedObjectAttributes { | ||
| indexName: string; | ||
| newIndexName: string; | ||
| status: ReindexStatus; | ||
| lastCompletedStep: ReindexStep; | ||
| locked: string | null; | ||
| reindexTaskId: string | null; | ||
| reindexTaskPercComplete: number | null; | ||
| errorMessage: string | null; | ||
| mlReindexCount: number | null; | ||
| } | ||
|
|
||
| export type ReindexSavedObject = SavedObject<ReindexOperation>; | ||
|
|
||
| export enum ReindexWarning { | ||
| allField, | ||
| booleanFields, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "upgrade-assistant-reindex-operation": { | ||
| "dynamic": true, | ||
| "properties": { | ||
| "indexName": { | ||
| "type": "keyword" | ||
| }, | ||
| "status": { | ||
| "type": "integer" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
x-pack/plugins/upgrade_assistant/public/components/tabs/checkup/deprecations/_index.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.