Show an alert if there are pending obsolete elastic migrations
What does this MR do and why?
Shows an alert if there are pending obsolete elastic migrations:
How to set up and validate locally
- Ensure Elasticsearch is running
- Update an obsolete migration's state to
completed:false
:curl -d '{"doc": { "completed": false }}' -H 'Content-Type: application/json' -X POST http://localhost:9200/gitlab-development-migrations/_update/20201105181100
- Clear the cached value storing the migration's completion state:
Elastic::DataMigrationService.drop_migration_has_finished_cache!(Elastic::DataMigrationService[20201105181100])
- Visit the advanced search page at
/admin/application_settings/advanced_search
and see that an alert is shown. - Mark all migrations are completed:
Elastic::DataMigrationService.mark_all_as_completed!
- Visit the advanced search page at
/admin/application_settings/advanced_search
and see that no alerts are shown.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #416307 (closed)
Edited by Madelein van Niekerk