Pipeline for code rollback
Our rollback pipelines were designed at the beginning of auto-deploy development.
Now that we deploy daily our needs are changed, and we need to evolve the rollback pipeline.
With smaller and more frequent deployments, we can consider a rollback strategy that will not interact with the database.
Thanks to the way we split migrations into regular and post-deployment ones before we reach the post-deployment migration job, it is safe to rollback the code and let GitLab run with a newer schema.
This is exactly what already happens during deployment, where the migrations run before upgrading the fleet, and we have
application N running on
schema N+1 from the start of
cny deployment to the end of the
main stage rollout.