ci(release): wait for the tagged commit's CI instead of reading it as failed - #447
Merged
Conversation
… failed The publish gate asks the API for `conclusion` on the tagged commit's `ci.yml` run and requires `success`. A run that is still going reports `null` there, and the check treated that the same as a failure -- so a tag pushed two minutes after its merge, with CI still queued behind the release run's own build jobs, was rejected for having "no successful ci.yml run". That is what happened to v1.0.4: the commit was fine, went green 32 minutes later, and a rerun published it with no change at all. Nothing was published in the meantime, so the gate did its job. Its verdict was still wrong, and the distinction it missed is the one that matters: not decided yet is not decided against. The step now polls until the run settles, bounded to 45 minutes, and says what it is waiting on. Any conclusion other than `success` still fails on the spot, so a genuinely broken commit is refused as fast as before -- only the undecided case waits. `timeout-minutes` on the job moves from 10 to 60 so it outlives the wait it now performs. This also removes the reason to rush a tag. Tagging early mattered because r-universe builds the R binding from `main` and resolves its C ABI from the release matching `DESCRIPTION`, so a bump left untagged puts those builds on a 404; waiting for CI first spent 25 to 55 minutes of that window. The gate now holds the tag for as long as it needs, and neither constraint has to be timed by hand. Written and linted, not run: `release.yml` executes only on a pushed `v*` tag, so the next release is the first time this path is exercised.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
The publish gate asks the API for
conclusionon the tagged commit'sci.ymlrun and requires
success. A run that is still going reportsnullthere, andthe check treated that the same as a failure -- so a tag pushed two minutes after
its merge, with CI still queued behind the release run's own build jobs, was
rejected for having "no successful ci.yml run". That is what happened to v1.0.4:
the commit was fine, went green 32 minutes later, and a rerun published it with
no change at all.
Nothing was published in the meantime, so the gate did its job. Its verdict was
still wrong, and the distinction it missed is the one that matters: not decided
yet is not decided against. The step now polls until the run settles, bounded to
45 minutes, and says what it is waiting on. Any conclusion other than
successstill fails on the spot, so a genuinely broken commit is refused as fast as
before -- only the undecided case waits.
timeout-minuteson the job moves from10 to 60 so it outlives the wait it now performs.
This also removes the reason to rush a tag. Tagging early mattered because
r-universe builds the R binding from
mainand resolves its C ABI from therelease matching
DESCRIPTION, so a bump left untagged puts those builds on a404; waiting for CI first spent 25 to 55 minutes of that window. The gate now
holds the tag for as long as it needs, and neither constraint has to be timed by
hand.
Written and linted, not run:
release.ymlexecutes only on a pushedv*tag,so the next release is the first time this path is exercised.