-
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
[7.x] [Upgrade Assistant] Better handling of closed indices (#58890) #59650
Merged
Conversation
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
* Exclude disallowed, private setting at index creation * Remove intl from tabs component * Added logic for checking the current index status * Added ES contract integration test Using _cluster/state is considered internal. This adds an integration test for checking the contract in CI. * Add the client side notification for closed indices * First version of end-to-end functionality working * Clean up unused, incorrect type information * Fix type issues and added a comment about the new reindex options * Fixed server side tests, added comments and logic updates Updated the handling of reindexOptions to make it more backwards compatible (treat it as if it could be undefined). Also update the logic for checking for open or closed indices. No optional chaining! It should break if the response does not exactly match. * Clean up unused code * Improved idempotency of test and check explicitly for "close". Rather check for the specific value we want, as this is what is also gauranteed by the tests. In this way, the information we send back to the client is also more accurate regarding the index status. If, in future, more index states are introduced this will need to be revisited if it affects the ability for an index to be re-indexed. * Update client-side tests * Fix types * Handle a case where the index name provided may be an alias * Fix types * merge-conflict: finish merge conflict resolution * Update x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/closed_warning_icon.tsx Co-Authored-By: Alison Goryachev <[email protected]> * merge-conflict: Remove duplicate import VSCode does not auto-save as expected :sigh: * ui: Revisit the UI Moved the warning icon to inside of the button and tooltip to on the button. Added a callout to the reindex flyout for when an index is closed. * logic: slight update to when the index closed callout is shown We only show the index closed callout in the flyout when the reindex operation is not considered "completed" * tests: fix jest tests * refactor: remove "openAndClose" from reindex endpoints "openAndClose" should just happen automatically. The user should not have to pass the flag in, that would be a weird API. We just need to warn the user about that reindexing a closed index will take more resources * test: update upgrade assistant integration test * fix: types * copy: use sentence case * refactor: use the in scope declaration of reindex op * test: Clean up tests Reindexing test was generating index name, could just get it from server response. Also removed openAndClose from all integration tests Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Alison Goryachev <[email protected]> # Conflicts: # x-pack/plugins/upgrade_assistant/common/types.ts # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/cell.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/index_table.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/list.test.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/list.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/button.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/checklist_step.test.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/checklist_step.tsx # x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/container.tsx # x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_migration_apis.test.ts.snap # x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
Also updated existing Jest snapshots.
The integration test on master is reference 7.0 because it aims toward helping users migrate from 7.0 -> 8.0. The 7.x branch is running 6.0 data as it helps migrate from older indices.
@elasticmachine merge upstream |
After removing the test data, this snapshot also needed to be updated
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/dashboard/dashboard_query_bar·js.dashboard app using current data dashboard query bar causes panels to reload when refresh is clickedStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backports the following commits to 7.x: