-
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
[Upgrade Assistant] Removes unnecessary mappings for reindexing #150878
Conversation
…jects for reindexing
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
💚 Build Succeeded
Metrics [docs]Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @yuliacech! Checked out the PR locally and tested reindexing - works fine for me. 👍
Regarding the code changes, I see that some of the deleted fields are used in multiple test files and other files like x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.ts
for example:
async createReindexOp(indexName: string, opts?: ReindexOptions) {
return client.create<ReindexOperation>(REINDEX_OP_TYPE, {
indexName,
newIndexName: generateNewIndexName(indexName),
status: ReindexStatus.inProgress,
lastCompletedStep: ReindexStep.created,
locked: null,
reindexTaskId: null,
reindexTaskPercComplete: null,
errorMessage: null,
runningReindexCount: null,
reindexOptions: opts,
});
},
Should these files be updated as well?
Thanks a lot for your review, @ElenaStoeva!
For this code to work, we need to keep the field |
Thanks for the clarification @yuliacech! Reviewed the code changes again and given what you explained, everything looks good to me. 👍 |
…1014) ## Summary Partially addresses #64547 Follow up to #150878 This PR removes unnecessary mappings from the saved objects type `upgrade-assistant-ml-upgrade-operation. This saved objects are used to store the resolution progress of ml snapshot deprecations. Currently, the ml deprecations are disabled via a config for Upgrade Assistant plugin `xpack.upgrade_assistant.featureSet.mlSnapshots`. And ES will probably not let us use any old ml snapshots in the 8.x version. ### How to test 1. Add `xpack.upgrade_assistant.featureSet.mlSnapshots: true` to your `kibana.dev.yml` file 2. Start ES and Kibana with `yarn es snapshot --license=trial` and `yarn start` 3. Add a sample data set, for example `kibana_sample_data_flights`. 4. Navigate to Analytics -> Machine Learning -> Anomaly Detection -> Jobs. 5. Create a job for a single metric, chose a time range with some data in it. Memorize the value you input for job ID. 6. Start and stop the job's datafeed a couple of times, so that you have more than 1 snapshot. Memorize the value of the snapshot ID. 7. 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: [ { level: 'critical', message: 'model snapshot [1676291073] for job [test_123] needs to be deleted or upgraded', url: '', details: 'details', _meta: { snapshot_id: '1676291073', job_id: 'test_123' }, resolve_during_rolling_upgrade: false, }, ], index_settings: {}, }; ``` where `job_id` and `snapshot_id` are values from step 5 and 6. 8. open UA and test the resolution of the ml snapshot deprecation.
## Summary Fixes #64547 Follow up to #150878 and #151014 This PR removes the saved object type `upgrade-assistant-telemetry` from the Upgrade Assistant plugin because it seems to not be used for telemetry or UA functionality. There is a telemetry object to track UA deprecation logging in this [file](https://github.com/elastic/kibana/blob/main/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json#L13628), I don't think that a saved object is needed for that. --------- Co-authored-by: kibanamachine <[email protected]>
## Summary Fixes elastic#64547 Follow up to elastic#150878 and elastic#151014 This PR removes the saved object type `upgrade-assistant-telemetry` from the Upgrade Assistant plugin because it seems to not be used for telemetry or UA functionality. There is a telemetry object to track UA deprecation logging in this [file](https://github.com/elastic/kibana/blob/main/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json#L13628), I don't think that a saved object is needed for that. --------- Co-authored-by: kibanamachine <[email protected]>
## Summary Fixes #154037 This PR updates the saved objects types used in Upgrade Assistant for reindexing operations and ML snapshots. This is needed in preparation for serverless and should not have any affect on the UI. For testing this PR I would suggest using the same steps as in these 2 PRs for [reindexing](#150878) and [ml snapshots](#151014). --------- Co-authored-by: kibanamachine <[email protected]>
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:
xpack.upgrade_assistant.featureSet.reindexCorrectiveActions: true
to yourkibana.dev.yml
fileyarn es snapshot --license=trial
andyarn start
system_indices_superuser
(in Stack Management -> Security -> Users). Log in with that user for further steps.deprecations
on line 22 in the file/server/lib/es_deprecations_status.ts
withold_index
Follow up work
A follow up PR if needed will be opened for saved objects types
upgrade-assistant-ml-upgrade-operation
andupgrade-assistant-telemetry