Skip to content

Container Registry: Implement methodology for database migrations

Summary

We need to define and implement a methodology to actively preform migrations of the metadata database for the Container Registry

Details

From https://gitlab.com/gitlab-org/charts/gitlab/-/issues/2579

Container

  1. The database must be reachable, and migrations completed. (see https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs-gitlab/database-migrations.md)
    • Add /srcipts/wait-for-deps which checks for the state of migrations (and db reachability)
    • Add /scripts/db-migrate which will perform the actual migrations
    • This work done in #2565

Chart

  1. A Job added to perform migrations
  2. document that manual database provisioning will be needed for upgrades
  3. document that migrations behaviors will need to operate from an operational service container, when automatic migrations are disabled.

Current behavior

When using metadata database, migrations will not happen until manually triggered

Expected behavior

When using metadata database, migrations are handled in a defined, automatic fashion

Edited by Jason Plum