Skip to content

ci: make the deploy job re-runnable after a partial failure - #247

Merged
bdraco merged 1 commit into
masterfrom
ci-deploy-rerunnable
May 19, 2026
Merged

bdraco merged 1 commit into
masterfrom
ci-deploy-rerunnable

Conversation

@bdraco

@bdraco bdraco commented May 19, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Make the deploy job in ci-cd.yml re-runnable after a partial
release failure.

  • The Make Release step is now gated on a preceding gh release view check, so it is skipped when the GitHub Release for the tag
    already exists (instead of failing with HTTP 422 already_exists).
  • The PyPI publish step is invoked with skip-existing: true so a
    retry does not fail on dists that were already uploaded.

Concretely, this means that if PyPI returns a 5xx (or any other
transient failure after the GitHub Release was created), the maintainer
can re-run the failed deploy job instead of cutting a brand-new
release. This mirrors the equivalent change in yarl (aio-libs/yarl#1721),
where the v1.24.0 cut hit exactly this scenario.

The existence check matches only the literal release not found
reply for the not-exists branch; auth, rate-limit, or transient network
failures re-raise so the deploy job fails loudly with the real error
instead of falling through.

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.

Related issue number

None; ports aio-libs/yarl#1721 to propcache.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist; N/A (CI workflow change, exercised by the next release run)
  • Documentation reflects the changes; N/A
  • Add a new news fragment into the CHANGES/ folder
Agent run details (optional, for reviewers)

Drafted with Claude Code (claude-opus-4-7); reviewed by @bdraco.

Local checks:

  • make doc-spelling; the new fragment introduces no new misspellings (the 2 reported warnings are pre-existing on master: subdirectory in CHANGES/207.contrib.rst and postfix in CHANGES.rst:168).
  • yamllint; passes for the workflow change.
  • python -c "import yaml; yaml.safe_load(...)"; workflow parses cleanly.

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;
auth, rate-limit, or transient network failures re-raise so the job
fails loudly instead of falling through to Make Release and erroring
out with HTTP 422.
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 19, 2026
@bdraco
bdraco marked this pull request as ready for review May 19, 2026 20:03
@bdraco
bdraco merged commit 157d62f into master May 19, 2026
14 checks passed
@bdraco
bdraco deleted the ci-deploy-rerunnable branch May 19, 2026 20:03
@codspeed

codspeed Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing ci-deploy-rerunnable (93dc968) with master (2ef2907)

Open in CodSpeed

@codecov

codecov Bot commented May 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (2ef2907) to head (93dc968).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #247   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          10       10           
  Lines         439      439           
  Branches       17       17           
=======================================
  Hits          437      437           
  Misses          2        2           
Flag Coverage Δ
CI-GHA 97.49% <ø> (ø)
OS-Linux 97.49% <ø> (ø)
OS-Windows 94.53% <ø> (ø)
OS-macOS 94.53% <ø> (ø)
Py-3.10 94.53% <ø> (ø)
Py-3.11 96.12% <ø> (ø)
Py-3.12 96.12% <ø> (ø)
Py-3.13 96.12% <ø> (ø)
Py-3.14 96.10% <ø> (ø)
Py-3.14t 96.10% <ø> (ø)
Py-pypy-3.10 78.13% <ø> (ø)
VM-macos-latest 94.53% <ø> (ø)
VM-ubuntu-latest 97.49% <ø> (ø)
VM-windows-11-arm 94.30% <ø> (ø)
VM-windows-latest 94.53% <ø> (ø)
pytest 97.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant