Skip to content

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:

Screenshot_2023-07-27_at_12.10.47

How to set up and validate locally

  1. Ensure Elasticsearch is running
  2. 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
  3. Clear the cached value storing the migration's completion state: Elastic::DataMigrationService.drop_migration_has_finished_cache!(Elastic::DataMigrationService[20201105181100])
  4. Visit the advanced search page at /admin/application_settings/advanced_search and see that an alert is shown.
  5. Mark all migrations are completed: Elastic::DataMigrationService.mark_all_as_completed!
  6. 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.

Related to #416307 (closed)

Edited by Madelein van Niekerk

Merge request reports

Loading