You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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 PR adds test cases to check that when Kibana migrations fail due to a temporary problem in Elasticsearch, Kibana can automatically finish the migration when the failure condition is resolved.
To achieve the ES error simulation during migration, I've done the following:
Proxied the ES client passed to the migrators to simulate errors.
Introduced a subject that emits the current step in the migrator state machine
We can run the migrator in the test and instruct it to fail after a certain step
Currently, the areas of failure testing are on the following migrator steps:
fail es at alias change (final step) MARK_VERSION_INDEX_READY
fail at the update target mappings (modifying operations, first 2 ops) UPDATE_TARGET_MAPPINGS_PROPERTIES and UPDATE_TARGET_MAPPINGS_PROPERTIES_WAIT_FOR_TASK
fail at any step in the clone target mappings CLONE_TEMP_TO_TARGET
A chaos test by writing a test case that fails ES at a random migrator step.
[job][logs] Jest Integration Tests #4 / split .kibana index into multiple system indices failure cases successfully performs the migrations even if a migrator fails
Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.
Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.
…ency (#166924)
## Summary
Tackles #158818
The goal of the PR is to introduce failures in single migrators at some
of the crucial steps of the migration, testing that consistency is
maintained, and that subsequent migration attempts can successfully
complete the upgrade.
This is done by _proxying_ the `Client` class, which uses the
elasticsearch-js library underneath to perform all calls to ES.
Inspired on #158995.
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.
[DRAFT, NO NEED FOR REVIEW YET]
This PR adds test cases to check that when Kibana migrations fail due to a temporary problem in Elasticsearch, Kibana can automatically finish the migration when the failure condition is resolved.
To achieve the ES error simulation during migration, I've done the following:
Currently, the areas of failure testing are on the following migrator steps:
MARK_VERSION_INDEX_READY
UPDATE_TARGET_MAPPINGS_PROPERTIES
andUPDATE_TARGET_MAPPINGS_PROPERTIES_WAIT_FOR_TASK
CLONE_TEMP_TO_TARGET
Closes #158818