ci: make the deploy job re-runnable after a partial failure#1353
Merged
Conversation
Skip the Make Release step when the GitHub Release for the tag already exists, and pass skip-existing to the PyPI publish step. This lets the deploy job be re-run after a partial release failure (e.g. PyPI 5xx after the GitHub Release was already created) without having to cut a new version. The existence check matches only the literal "release not found" reply for the not-exists branch and re-raises anything else, so auth, rate limit, or transient network failures fail loudly with the real error instead of falling through to Make Release.
webknjaz
reviewed
May 19, 2026
Member
webknjaz
left a comment
There was a problem hiding this comment.
This is why I prefer having workflow_dispatch as a trigger and pushing the tag post PyPI upload.
| with: | ||
| # Allow re-running the deploy job after a partial PyPI upload | ||
| # without failing on dists that were already published. | ||
| skip-existing: true |
Member
There was a problem hiding this comment.
Make this conditional, check the rerun counter GHA puts in the context automatically. The first run shouldn't have this, only restarts.
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.
What do these changes do?
Make the
deployjob inci-cd.ymlre-runnable after a partialrelease failure.
Make Releasestep is now gated on a precedinggh release viewcheck, so it is skipped when the GitHub Release for the tagalready exists (instead of failing with
HTTP 422 already_exists).skip-existing: trueso aretry does not fail on dists that were already uploaded.
The existence check matches only the literal
release not foundreply for the not-exists branch and re-raises anything else, so auth,
rate-limit, or transient network failures fail loudly with the real
error instead of being mistaken for "release does not exist" and
falling through to
Make Release.Ported from the equivalent yarl change in aio-libs/yarl#1721.
Are there changes in behavior for the user?
No. This only affects how the release pipeline recovers from partial
failures; the produced artifacts and release are unchanged.
Is it a substantial burden for the maintainers to support this?
No; it removes a manual recovery step.
Related issue number
No tracking issue; ported from aio-libs/yarl#1721.
Checklist
CONTRIBUTORS.txt- already listedCHANGES/folderAgent run details (optional, for reviewers)
Drafted with Claude Code (claude-opus-4-7); reviewed by @bdraco.
Local checks:
make doc-spellingpasses for the new fragment (the 5 remainingwarnings are pre-existing on
masterinCHANGES.rstand notintroduced here);
distswas added todocs/spelling_wordlist.txtto clear the only new warning fromthe fragment.
pre-commit run(yamllint, Validate GitHub Workflows, CheckGitHub Workflows set timeout-minutes, changelog
:user:rolecheck) all pass for the changed files.
No unit-test suite was run; the change is workflow-only and is
exercised by the next
deployjob run.