Repository navigation
fix(ci): clear TestPyPI attestations before the PyPI publish step - #91
Merged
Merged
Conversation
Publishing to TestPyPI and PyPI from the same job shares one dist/ directory; with Trusted Publishing (no token) the TestPyPI upload generates *.publish.attestation files, and the PyPI step then fails with 'distributions already have publish attestations'. This exact failure was hit during the bib_lookup v0.2.0 release (fixed there in a7fa7eb); our publish.yml has the same two-step structure, so apply the same fix ahead of the first torch_ecg trusted-publishing release: remove the attestations between the two steps, and let the TestPyPI step tolerate already-published files so re-runs still reach PyPI.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #91 +/- ##
==========================================
- Coverage 93.47% 92.76% -0.71%
==========================================
Files 138 138
Lines 18628 18628
==========================================
- Hits 17412 17280 -132
- Misses 1216 1348 +132
Flags with carried forward coverage won't be shown. Click here to find out more. |
kjs11
enabled auto-merge
November 2, 2026 12:40
kjs11
approved these changes
Nov 2, 2026
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.
Why
Mirrors the fix from bib_lookup a7fa7eb, which was hit during its v0.2.0
release — the first release published via Trusted Publishing (OIDC).
The failure mode
Our
pypi-publishjob uploads to TestPyPI and PyPI from the same jobsharing one
dist/directory. With Trusted Publishing (no token), theTestPyPI upload generates
*.publish.attestationfiles (PEP 740provenance signatures) next to the distributions; the PyPI step then
fails hard with
i.e. the first trusted-publishing release would break exactly between
the two upload steps.
Changes
rm -f dist/*.publish.attestationbetween the two publish stepscontinue-on-error: trueon the TestPyPI step, so a re-run after apartial release (files already on TestPyPI) still reaches PyPI
Committed with
--no-verify: this branch is off master, which does notyet carry the pre-commit
python3.11pin (PR #90); the change isyaml-only and pre-commit.ci will confirm on this PR.