Skip to content

Add the retry button to failed migrations

What does this MR do?

Allows admins to retry background migrations in the web UI

Screenshots or Screencasts (strongly suggested)

Screenshot_2021-08-04_at_17.51.27

How to setup and validate locally (strongly suggested)

  1. Create a failed migration.

Example:

Gitlab::Database::BackgroundMigration::BatchedMigration.create!(
  job_class_name: 'MyJobClass',
  table_name: 'projects',
  column_name: 'id',
  interval: 300,
  min_value: 5,
  max_value: 1000,
  batch_class_name: 'MyBatchClass',
  batch_size: 100,
  sub_batch_size: 10,
  job_arguments: %w[],
  status: 'failed',
)
  1. Go to http://127.0.0.1:3000/admin/background_migrations?tab=failed

  2. Click on the button retry

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Relates to #326760 (closed)

Edited by Diogo Frazão

Merge request reports

Loading