Reset registry migration data for images with more than 100 tags
Background
As we rollout the new container registry on production, we have started by migrating all images with less than 100 tags. Once completed, we will be importing the images with more than 100 tags.
Currently, when an image with more than 100 tags is found, we skip it. So before we are able to import them, we need to reset their state.
Proposal
Create two migrations and one code update:
- Update the Enqueuer so if the
max_tags_count
is 0, we ignore the tag count (return true): https://gitlab.com/gitlab-org/gitlab/-/blob/039e424729bb768eb0964ecaa00a42bb00eae71a/app/workers/container_registry/migration/enqueuer_worker.rb#L68 - Create a background migration (possibly a post-deployment migration depending on timing) to update all container repositories with
migration_state: 'skipped', migration_skipped_reason: :too_many_tags
back tomigration_state: 'default'
- After the migration is complete, make a change request to update
application_settings.container_registry_import_max_tags_count
to 0
Edited by Steve Abrams