Repository navigation
chore(release): catch the three gaps v0.22.0 found - #2108
Merged
Merged
Conversation
Each of these turned a five-second pre-flight question into a failure part-way through distributing a release. **A crate that has never been published now fails pre-flight, not the release.** `check-publish-crates.py` already kept the `CRATES` array in sync with the workspace, and it passed for v0.22.0 — `rustledger-returns` and `rustledger-budget` were both correctly listed. Neither had ever been published, and trusted publishing cannot create a crate, so the crates.io job died on the first of them and seven dependents cascaded behind it with `no matching package`. `--check-registry` asks crates.io whether each listed crate exists; RELEASING.md's pre-flight runs it. Off by default so the per-PR run stays offline. The check sends a User-Agent, because crates.io answers 403 without one and a naive status check reads that as "exists" for every crate. Verified it reports dirty: a bogus name comes back absent, two real ones do not. **Release Channel Testing no longer requires the publish run to have succeeded.** It gated on `conclusion == 'success'`, so an expired COPR token failed one packaging job, the run concluded failure, and the workflow never fired — nothing checked whether crates.io and npm were serving the release, which is the question it exists to answer and the one you most want answered when a release went sideways. It now runs on failure too; a partial publish produces red channel tests naming which channels are short, which beats silence. `cancelled` and `skipped` still skip, since there is nothing to verify. **COPR credentials have a troubleshooting entry.** The job builds `~/.config/copr` from the `COPR_LOGIN` / `COPR_TOKEN` repository secrets, so renewing the token locally does nothing — a fact that took reading the workflow to establish. The entry names both secrets and uses `gh secret set` without arguments, which prompts with hidden input rather than putting the value in shell history. The shellcheck findings actionlint reports for release-test.yml are pre-existing: 38 on main, 38 with this change. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the release pipeline by adding pre-flight checks and ensuring post-publish channel verification runs even when the publish workflow fails, addressing failure modes encountered during v0.22.0 distribution.
Changes:
- Extend
scripts/check-publish-crates.pywith an optional--check-registrymode to verify all crates in the publish list already exist on crates.io (trusted publishing cannot create new crates). - Update
release-test.ymlto run channel verification whenRelease Publishconcludes with failure (not only success), so partial publishes are validated. - Document the new pre-flight step and add troubleshooting guidance for renewing COPR credentials in
RELEASING.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/check-publish-crates.py | Adds --check-registry crates.io existence verification to catch never-published crates before release. |
| RELEASING.md | Documents the new pre-flight check and adds COPR secret-renewal troubleshooting steps. |
| .github/workflows/release-test.yml | Expands trigger gating so channel verification runs after failed publish runs (to detect partial distribution). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
…ent crates.io errors Both from Copilot's review, and both right. **The trigger enumerated conclusions instead of excluding them.** The comment above it said `cancelled` and `skipped` are the ones with nothing to verify, but the condition listed `success` and `failure` — so `timed_out`, `action_required` and `neutral` would have skipped channel verification too. Those are exactly the conclusions most likely to leave a partial publish behind, which is the case this change exists to cover. Inverted to match what the comment already claimed. **`--check-registry` treated any non-404 as fatal.** A 429 or a 502 says nothing about whether a crate exists, and failing pre-flight on a blip trains people to ignore the check — worse than not having it. Transient statuses and connection errors now retry with backoff; a definitive 404 still answers immediately. Verified by injection rather than by reading: two 503s then success recovers on the third attempt, a persistent 503 exits after four with the status named, and a 404 is answered in one attempt without retrying. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
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.
Each of these turned a five-second pre-flight question into a failure
part-way through distributing v0.22.0.
1. A never-published crate now fails pre-flight, not the release
scripts/check-publish-crates.pyalready kept theCRATESarray in sync withthe workspace, and it passed for v0.22.0 —
rustledger-returnsandrustledger-budgetwere both correctly listed. Neither had ever beenpublished, and trusted publishing cannot create a crate, so the crates.io job
died on the first of them (
403 Trusted Publishing tokens do not support creating new crates) and seven dependents cascaded behind it withno matching package. Half the release had already gone out.--check-registryasks crates.io whether each listed crate exists.RELEASING.md's pre-flight now runs it. Off by default, so the per-PR run stays
offline and network-independent.
Two things worth noting about the check itself:
403without one, which anaive status check reads as "exists" — for every crate. I made exactly that
mistake while diagnosing the failure, and briefly concluded both crates were
already published.
real ones do not. A guard that has only ever said "clean" isn't a guard.
2. Channel verification no longer requires the publish run to have succeeded
release-test.ymlgated onconclusion == 'success'. At v0.22.0 an expiredCOPR token failed one packaging job, the run concluded
failure, and theworkflow never fired — so nothing checked whether crates.io and npm were
actually serving the release. That is the question it exists to answer, and
the one you most want answered when a release has gone sideways.
It now runs on
failuretoo. A partial publish produces red channel testsnaming exactly which channels are short, which beats silence.
cancelledandskippedstill skip — there is nothing to verify.3. COPR credentials have a troubleshooting entry
The job builds
~/.config/coprfrom theCOPR_LOGIN/COPR_TOKENrepository secrets, so renewing the token locally does nothing for CI — a
fact that took reading the workflow to establish while the release was
half-done. The entry names both secrets and uses
gh secret setwith noargument, which prompts with hidden input rather than putting the value in
shell history.
Verification
check-publish-crates.pypasses offline and with--check-registry(17/17 crates present), and
unpublished()correctly flags a bogus name.actionlintonrelease-test.yml: 38 shellcheck findings, identical tomain — none introduced. (They are pre-existing unquoted-variable warnings
elsewhere in the file.)
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr