Skip to content

Consider strategies to avoid parallel tag-pushes (and parallel deployments) #2

@halfer

Description

@halfer

I just pushed two tags at the same time:

git push --tags
Counting objects: 2, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 203 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To git@github.com:halfer/cd-demo-container.git
 * [new tag]         deploy-v21 -> deploy-v21
 * [new tag]         deploy-v22 -> deploy-v22
 * [new tag]         show -> show

This causes the two versions to race to deploy, v22 was first, so unexpectedly v21 was deployed second, and this persisted, even though one would expect v22 to be the final deployment.

How can this situation be detected so that only one deployment is kicked off?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions