Skip to content

Provide simple state check mechanism for database migrations

Summary

For use within automation, it would be extremely useful to have a machine-readable mechanism to know the Yay || Nay state of migrations.

Description

As part of deploying this functionality for GitLab.com, implementation of cloud native scaling is required. In discovery, we found that the only method available to us currently is to detect an empty second column in the output table. Should that format ever change (content, location, demarcation), this would break.

registry database migrate status CONFIG | tail -n2 | head -n1 | cut -d'|' -f 2

We'd sincerely appreciate not having to read through all of this text, only to look for an empty. Could we have something like this 🙇 :

$ registry database migrate version --up-to-date CONFIG
NOTOK

Relates to https://gitlab.com/gitlab-org/charts/gitlab/-/issues/2579

Relates to gitlab-org/charts/gitlab#2566 (closed)

Edited by Jason Plum