Skip to content

Enqueuer job: add container repository migration state logging

🌳 Context

We're currently implementing a data migration on the Container Registry. This migration is going to be driven by the rails backend.

At the core of the rails part lies the Enqueuer worker. Its responsibility is: find the next eligible image repository to migrate and call the container registry to start/retry the migration.

The migration itself is a multi step process. To follow things on the rails side, we have a state machine that is linked to the migration_state attribute.

In !83133 (merged), we added many additional logs so that we can monitor what this job is doing.

In #356999 (closed), we're suggesting adding one additional log: the migration state for the picked repo. This way when the job ends its execution, we know on which migration state the repo was put. This what MR adds.

Last piece of context, this migration is heavily gated behind feature flags that are not even enabled on gitlab.com yet. We are currently testing the whole process on staging and #356999 (closed) was created after noticing that having the migration_state in the logs would be useful for debugging.

🔬 What does this MR do and why?

  • Log the migration_state when the Enqueuer gets executed.
  • Update the related spec.

Screenshots or screen recordings

n / a

🚥 How to set up and validate locally

You can follow !83133 (merged) and see the new field extra.container_registry_migration_enqueuer_worker.container_repository_migration_state in the logs.

📏 MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Fernandez

Merge request reports