Skip to content

ci(release-plz): gate release-pr on the publish job to stop phantom releases - #30

Merged
jondkinney merged 1 commit into
mainfrom
ci/serialize-release-plz-release-pr
May 31, 2026
Merged

ci(release-plz): gate release-pr on the publish job to stop phantom releases#30
jondkinney merged 1 commit into
mainfrom
ci/serialize-release-plz-release-pr

Conversation

@jondkinney

Copy link
Copy Markdown
Owner

Problem

release-plz.yml runs two jobs in parallel with no ordering between them:

  • release — publishes crates + cuts the tag/GitHub Release (~3–4 min)
  • release-pr — computes the next release PR by diffing local source against the registry

When two release PRs are merged in quick succession — before the first merge's publish finishes — the second run's release-pr queries the registry while it still shows the previous version, "rediscovers" the already-merged changes, and opens a phantom patch-release PR with no real content. Merging a phantom spawns the next one, so they chain.

This produced an empty vX → vX+1 → vX+2 patch-release chain in a sibling repo (vernier) after two release PRs were merged ~2 minutes apart, and a concurrent AUR git push race on the same release.

Fix

Add needs: release to the release-pr job so it runs only after the publish completes and the registry/tags are settled.

  • No behavior change on normal pushes: the release job is a fast no-op when nothing is pending, then release-pr runs as before.
  • If a publish fails, release-pr is skipped until it's fixed — desirable (don't compute the next PR off a half-published state).

Coordinated identical change across hyprcorrect / mousehop / tensaku / vernier.

release-pr ran in parallel with the publish job, so it could query the registry before the just-merged version finished publishing and open phantom patch-release PRs with no real content. After rapid back-to-back release merges this chains into a string of empty releases. Gate release-pr on `release` so it always computes against a settled registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jondkinney jondkinney mentioned this pull request May 31, 2026
@jondkinney
jondkinney merged commit 72f3a4c into main May 31, 2026
4 checks passed
@jondkinney
jondkinney deleted the ci/serialize-release-plz-release-pr branch May 31, 2026 02:43
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