Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Upgrade Assistant] Removes unnecessary mappings for reindexing (#150878
) ## Summary Partially addresses #64547 This PR removes unnecessary mappings from the saved objects type `upgrade-assistant-reindex-operation` that holds information about reindex processes. Currently, the reindexing is disabled via a config for Upgrade Assistant plugin `xpack.upgrade_assistant.featureSet.reindexCorrectiveActions`. ES also doesn't log any deprecations for indices created since 7.0 and indices created before 7.0 are incompatible with versions 8.0+. That means that when reindexing will be enabled in UA, it needs to be configured for the specific upgrade scenario, for example for 9.0. ### How to test Even though reindexing is currently disabled, I was able to do some testing for the changes. Here is how to test reindexing locally: 1. Add `xpack.upgrade_assistant.featureSet.reindexCorrectiveActions: true` to your `kibana.dev.yml` file 2. Start ES and Kibana with `yarn es snapshot --license=trial` and `yarn start` 3. Create a test user with the role `system_indices_superuser` (in Stack Management -> Security -> Users). Log in with that user for further steps. 4. Create an index via Dev Tools ``` POST /old_index/_doc { "test": "test" } ``` 5. replace `deprecations` on line 22 in the file [`/server/lib/es_deprecations_status.ts`](https://github.com/elastic/kibana/blob/main/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts#L22) with ``` const deprecations = { cluster_settings: [], node_settings: [], ml_settings: [], index_settings: { old_index: [ { level: 'critical', message: 'Index created before 7.0', url: 'https: //www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html', details: 'This index was created using version: 6.8.13', resolve_during_rolling_upgrade: false, }, ], }, }; ``` 6. open UA and test the reindexing of `old_index` ### Follow up work A follow up PR if needed will be opened for saved objects types `upgrade-assistant-ml-upgrade-operation` and `upgrade-assistant-telemetry`
- Loading branch information