Skip to content

Expose finalize BBM command in UI

Prabakaran Murugesan requested to merge 422572-expose-finalize-bbm-command into master

What does this MR do and why?

Extracted from: !129735 (comment 1519331741)

We have the script format specified in the upgrade docs to finalize BBMs manually, but filling in the params can be tricky sometimes with necessary job_arguments and class name. So this MR aims to expose an option in Admin UI to copy the command to manually finalize.

Screenshots or screen recordings

Before After
Screenshot 2023-11-22 at 17.17.25.png Screenshot 2023-11-23 at 13.02.34.png

How to set up and validate locally

  1. Make a Gitlab::Database::BackgroundMigration::BatchedMigration record to have failed status (status: 4)
  2. Go to http://gdk.test:3000/admin/background_migrations?tab=failed tab.
  3. On clicking the Copy command dropdown, you should be able to get fully formed script.
    1. eg: sudo gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,events,id,'[[\"column_1\"]\\,[\"column_1_convert_to_bigint\"]]']

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 #422572 (closed)

Edited by Prabakaran Murugesan

Merge request reports