-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Resilient saved object migration algorithm #78413
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
94 commits
Select commit
Hold shift + click to select a range
4765c3e
Initial structure of migration state-action machine
rudolf 1699561
Fix type import
rudolf 915fdcd
Retries with exponential back off
rudolf 90cfda7
Use discriminated union for state type
rudolf e48d013
Either type for actions
rudolf c630534
Test exponential retries
rudolf b85d986
TaskEither types for actions
rudolf 7f7e573
Fetch indices instead of aliases so we can collect all index state in…
rudolf 443a5d0
Log document id if transform fails
rudolf 4da5a84
WIP: Legacy pre-migrations
rudolf 7911ee0
UPDATE_TARGET_MAPPINGS
rudolf 8573d46
WIP OUTDATED_DOCUMENTS_TRANSFORM
rudolf dca4c5b
Narrow res types depending on control state
rudolf 7515240
OUTDATED_DOCUMENTS_TRANSFORM
rudolf bed8197
Use .kibana instead of .kibana_current
rudolf 71bbede
rename control states TARGET_DOCUMENTS* -> OUTDATED_DOCUMENTS*
rudolf 56bd467
WIP MARK_VERSION_INDEX_READY
rudolf e10d01b
Fix and expand INIT -> * transition tests
rudolf bf27c6d
Add alias/index name helper functions
rudolf 0d7a1a6
Add feature flag for enabling v2 migrations
rudolf 8eca894
split state_action_machine, reindex legacy indices
rudolf 85bc88d
Don't use a scroll search for migrating outdated documents
rudolf 0e672e7
model: test control state progressions
rudolf c27aa95
Action integration tests
rudolf 0d347c9
Fix existing tests and type errors
rudolf 4f95fd7
snapshot_in_progress_exception can only happen when closing/deleting …
rudolf e54d9d8
Retry steps up to 10 times
rudolf 18c6700
Update api.md documentation files
rudolf df4088b
Further actions integration tests
rudolf 6dfab82
Action unit tests
rudolf c002bc8
Fix actions integration tests
rudolf 776eb1b
Rename actions to be more domain-specific
rudolf 37ea126
Apply suggestions from code review
rudolf 328afd9
Review feedback: polish and flesh out inline comments
rudolf c6dd07f
Fix unhandled rejections in actions unit tests
rudolf 7c60f8b
model: only delay retryable_es_client_error, reset for other left res…
rudolf b93f834
Actions unit tests
rudolf 4ca7d4b
More inline comments
rudolf db5f86d
Actions: Group index settings under 'index' key
rudolf f70bb34
bulkIndex -> bulkOverwriteTransformedDocuments to be more domain spec…
rudolf 67685f6
state_action_machine tests, fix and add additional tests
rudolf eeeb1f9
Action integration tests: updateAndPickupMappings, searchForOutdatedD…
rudolf 27e444f
oops: uncomment commented out code
rudolf da07c75
actions integration tests: rejection for createIndex
rudolf fdcdc51
update state properties: clearer names, mark all as readonly
rudolf caf90a0
add state properties currentAlias, versionAlias, legacyIndex and test…
rudolf 0cfc420
Use CONSTANTS for constants :D
rudolf f3982fb
Actions: Clarify behaviour and impact of acknowledged: false responses
rudolf 5a72d0d
Use consistent vocabulary for action responses
rudolf c2ba683
KibanaMigrator test for migrationsV2
rudolf 0ca0b93
KibanaMigrator test for FATAL state and action exceptions in v2 migra…
rudolf 5023e02
Fix ts error in test
rudolf 901d4e3
Refactor: split index file up into a file per model, next, types
rudolf 56b90c0
next: use partial application so we don't generate a nextActionMap on…
rudolf 0826813
move logic from index.ts to migrations_state_action_machine.ts and test
rudolf 37ee3f5
Merge branch 'master' into so-migrations
rudolf 7dc62f1
add test
pgayvallet b76a40b
use `Root` to allow specifying oss mode
pgayvallet 29cb116
Add fix and todo tests for reindexing with preMigrationScript
rudolf a5c92e2
Dump execution log of state transitions and responses if we hit FATAL
rudolf 8319bb8
add 7.3 xpack tests
pgayvallet 5480e34
add 100k test data
pgayvallet 4f97684
Reindex instead of cloning for migrations
rudolf 3880038
Merge pull request #2 from pgayvallet/so-migrations-add-integration-test
rudolf ad79056
Skip 100k x-pack integration test
rudolf cc0eb44
MARK_VERSION_INDEX_READY_CONFLICT for dealing with different versions…
rudolf b3df941
Track elapsed time
rudolf 25b6519
Fix tests
rudolf e6d61f7
Merge branch 'master' into so-migrations
rudolf 5d6fe03
Model: make exhaustiveness checks more explicit
rudolf a7622dc
actions integration tests: add additional tests from CR
rudolf 7486426
migrations_state_action_machine fix flaky test
rudolf 688621c
Fix flaky integration test
rudolf 2f46188
Reserve FATAL termination only for situations which we never can reco…
rudolf 1370f02
Handle incompatible_mapping_exception caused by another instance
rudolf cd8676a
Cleanup logging
rudolf 4afb191
Fix/stabilize integration tests
rudolf 9d42a67
Add REINDEX_SOURCE_TO_TARGET_VERIFY step
rudolf 8851fea
Merge branch 'master' into so-migrations
rudolf e115b76
Strip tests archives of */.DS_Store and __MAC_OSX
rudolf 6dfbc0c
Task manager migrations: remove invalid kibana property when converti…
rudolf 55b124e
Add disabled mappings for removed field in map saved object type
rudolf 386a9f7
verifyReindex action: use count API
rudolf 33cb185
REINDEX_BLOCK_* to prevent lost deletes (needs tests)
rudolf 342e597
Split out 100k docs integration test so that it has it's own kibana p…
rudolf 80fed9c
REINDEX_BLOCK_* action tests
rudolf 892ae1c
REINDEX_BLOCK_* model tests
rudolf d0f2518
Include original error message when migration_state_machine throws
rudolf 286bdfa
Address some CR nits
rudolf eea4f9e
Fix TS errors
rudolf 3c46888
Fix bugs
rudolf 11dc7cf
Reindex then clone to prevent lost deletes
rudolf e815df4
Fix tests
rudolf 4a7f2f7
Merge branch 'master' into so-migrations
kibanamachine 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
11 changes: 0 additions & 11 deletions
11
docs/development/core/server/kibana-plugin-core-server.savedobjectsrawdoc._type.md
This file was deleted.
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
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.