Skip to content

Add gitlab-housekeeper OverdueFinalizeBackgroundMigration

This adds a job which runs the gitlab-housekeeper. We pass -k Keeps::OverdueFinalizeBackgroundMigration which ensures it will only run the keep responsible for finding batched background migrations that should be finalized and finalizes them.

Every time this scheduled job runs it will look for any batched background migrations that should be finalized and create merge requests to finalize them.

You can see a real MR created from this scheduled pipeline at gitlab-org/gitlab!150385 (merged) .

You can see other examples of MRs created by running this tool locally at https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&state=merged&author_username=project_52263761_bot_66de0d9c027ad0d6b413f50a3904241f . It was already used to finalize 16 migrations.

I've added this to the gitlab-com-database-testing project because this tool needs access to a thin clone of the production database to confirm that a batched background migration is indeed finished.

Longer term we may will add more "keeps" to the gitlab-housekeeper. Some of those may depend on database access and some of them may not. The ones that depend on the production database access can just be added here as we can run multiple keeps at once. The ones that don't depend on the database might make more sense to run from a different project.

Edited by Dylan Griffith

Merge request reports