Skip to content

Backfill routes namespace_id for projects

What does this MR do and why?

This is the background migration to backfill project routes with corresponding project namespace id. This migration depends on the project namespace backfilling to have completed successfully !77371 (merged)

Because running this migration depends on having another migration completed that provokes a roadblock for ~"group::workspace" to move forward. In order to unblock us we can ensure this migration does not run unless blocking migration(project namespaces) has successfully completed. So we can merge this backfilling migration without having to wait for the successful completion of the original one.

Consider this, normal migration flow(for self managed) would be to run the project namespace backfilling migration(!77371 (merged)) eg. in 14.8, then we'd need to have some migration that would finalise the project namespace backfilling migration(!82176 (merged)) e.g. 14.9, ensuring that !77371 (merged) completed successfully, then have this routes migration, perhaps also in 14.9 but after !82176 (merged) and then have another finalise migration for routes this time in 14.10, so that then the code can rely on the backfilled routes data. So we'll need customers to have art least 2 required upgrades 14.9(important finalize migration that can fail and leave instance in a limbo state) and 14.10 for the same finalize migration reason.

With this change I think we can reduce the required upgrade path to a single stop, as we could have both finalize migrations in 14.10

Run Estimates

Considering routes row count and that migration runs at biggest batch size of 10K we get: ~5 days

https://gitlab.com/gitlab-org/gitlab/-/issues/356510 - for more details

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 Alexandru Croitor

Merge request reports