ci(release-plz): gate release-pr on the publish job to stop phantom releases - #30
Merged
Merged
Conversation
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>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
release-plz.ymlruns 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 registryWhen two release PRs are merged in quick succession — before the first merge's publish finishes — the second run's
release-prqueries 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+2patch-release chain in a sibling repo (vernier) after two release PRs were merged ~2 minutes apart, and a concurrent AURgit pushrace on the same release.Fix
Add
needs: releaseto therelease-prjob so it runs only after the publish completes and the registry/tags are settled.releasejob is a fast no-op when nothing is pending, thenrelease-prruns as before.release-pris 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.