How to recover from a canceled coordinated pipeline?
How to recover from a canceled coordinated pipeline?
NOTE: This should be resolved as of January 2022: https://gitlab.com/gitlab-org/gitlab/-/issues/341561
With the current GitLab stable version - 14.3 at the moment of this guide - there’s no straightforward way to restart a canceled coordinated pipeline. Canceling a multi-project pipeline, such as the coordinated pipeline, causes the bridge jobs not to be initiated, recovering from this situation is complicated and time consuming. Because of this, it’s strongly advise for Release Managers to:
- Wait for the next coordinated pipeline to be created, or to,
- Manually create one by triggering the
prepare
task.
In the strange case the Release Manager requires to recover the coordinated pipeline, there are some steps they can follow depending on the scenario.
Continue with the deployments of the canceled pipeline
Bridge jobs, or deployment jobs, of a canceled coordinated pipeline are mark as skipped
.
To initiate them Release Managers need to retry the previous job:
Deployment to trigger | Previous job to retry |
---|---|
gstg-cny | auto_deploy:metrics:start_time |
gstg | auto_deploy:notify_<status>:gstg-cny |
gprd-cny | auto_deploy:notify_<status>:gstg |
Recreate the same coordinated pipeline.
If a Release Manager requires to create another coordinated pipeline based on the previous auto-deploy tag, these are the steps they can follow:
- Go to the pipelines page on the release/tools project in Ops.
- Click on
Run Pipeline
. - On
Run for branch or tag
search for the auto-deploy tag.- E.g. In the case of
14.4.202110081021-f1930dccb0f.1b5dda26e7dp
the auto-deploy tag would be14.4.202110081021
.
- E.g. In the case of
- Click on
Run Pipeline
.
This would generate a new coordinated pipeline using the specific auto-deploy tag. Two items to notice:
auto_deploy:wait:*
jobs can be unscheduled and executed at will since the auto-deploy package should already exist on dev.- Only the coordinated pipeline notification will be sent to Slack, packages notification won’t be sent again.