Skip to content

fix(ci): eliminate git tag race condition with dedicated set-git-tag job#71

Merged
tehw0lf merged 1 commit into
mainfrom
fix/git-tag-race-condition
Apr 30, 2026
Merged

fix(ci): eliminate git tag race condition with dedicated set-git-tag job#71
tehw0lf merged 1 commit into
mainfrom
fix/git-tag-race-condition

Conversation

@tehw0lf
Copy link
Copy Markdown
Owner

@tehw0lf tehw0lf commented Apr 30, 2026

Summary

  • Multiple publishing workflows (publish-docker-image, publish-npm-libraries, publish-python-libraries, release-github) were all setting the same git tag in parallel, causing TOCTOU failures when two jobs passed the ls-remote check simultaneously but only one could push
  • Extracts tag creation into a single new reusable workflow set-git-tag.yml, called as a dedicated set_git_tag job in build-test-publish.yml after security_scan_artifacts and before all publishing jobs
  • All publishing jobs now declare set_git_tag in their needs, so the tag is guaranteed to exist (or already existed) by the time any publisher runs
  • No changes to calling repos required — the fix is entirely internal to this workflow repository

Test plan

  • Trigger a push on a repo that uses both docker and npm publishing — verify both complete without tag conflict errors
  • Verify set_git_tag job appears in the workflow run graph between security_scan_artifacts and the publishing jobs
  • Verify that re-running a failed publisher no longer fails on the tag push (tag already exists → warning, continues)

Multiple publishing workflows (docker, npm, python, release) were
setting the same git tag in parallel, causing TOCTOU failures when two
jobs passed the ls-remote check simultaneously but only one could push.

Extracts tag creation into a single reusable set-git-tag.yml workflow
called as a dedicated job before all publishing jobs, making every
publisher depend on it via `needs`.
@tehw0lf tehw0lf merged commit d19ea2c into main Apr 30, 2026
2 checks passed
@tehw0lf tehw0lf deleted the fix/git-tag-race-condition branch April 30, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant