Repository navigation
ci: let a release recover from a registry or signing outage - #592
Merged
Merged
Conversation
A release run that stops partway can now be started again for the same candidate. The controller skips a package whose tag and GitHub Release exist and whose registry files match the qualified bytes by SHA-256, and sends every other package back to its publish worker. A public file with other bytes stops the release and names the file. A publish step that fails while uploading or signing is retried twice, five minutes apart, by re-running the run's failed jobs. A worker that finds some qualified files already on PyPI uploads the rest with skip-existing, and the strict check after the upload proves every file. The VS Code worker now waits up to 45 minutes for the Open VSX review and logs "still under review" while Open VSX answers 404. Closes #590 Part of #589 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The check after a PyPI upload requires every file again when PyPI lists none, so an empty or hash-less file list cannot pass it. - A restart skips a package only when its tag is annotated and its GitHub Release holds exactly the qualified files; otherwise the worker runs. - A retry scheduled near the time limit still runs, and a run someone restarted by hand during the delay is followed rather than restarted. - release.py also imports pypi_release when validate.py loads it. - The Open VSX and Marketplace waits survive a single network error. - docs/codebase.md describes the partial-upload rule in every package section, and says to wait for the stopped run's workers before a restart. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced 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.
Summary
The publish workflows now build every release from a clean runner. No job in
a
*--publish.ymlworkflow restores or saves a GitHub Actions cache, and anew validator fails the gate if one starts to again. The qualify build and
smoke jobs also check out
github.shainstead ofinputs.release_commit.verify-versionalready requires the two to be the same commit, so this iswhat closes the CodeQL alerts.
Ordinary CI keeps all of its caches.
What CodeQL reports, and why removing caches alone does not close it
The 28 open
actions/cache-poisoning/poisonable-stepalerts (#15-#29,#31-#42, #75; #30 was already marked fixed) are on the build and smoke jobs
of all six publish workflows. CodeQL's rule fires when a job started on the
default branch checks out a ref it treats as untrusted and then runs a script
from that checkout. It does not look at whether the job uses a cache: code
from that checkout could read the runner's cache token and save entries into
main's cache, which othermainruns restore later. CodeQL treatsinputs.release_commitas untrusted because it is an input.So there are two separate problems, and this PR fixes both:
mainmay have beensaved by any earlier
mainrun, in any workflow. One correction to howthis was first described: GitHub keeps each pull request's caches in the
pull request's own scope, so a pull request cannot save a cache that a run
on
mainrestores. The risk comes from every workflow that runs onmain(and every action those runs use), not from pull requests directly.
The caches restored were:
sccache: "true"onmaturin-action);
enable-cache: auto) in everyjob that installs uv;
release jobs. The VS Code release job holds the marketplace
credentials;
(
actions/cache).verify-versionstops the rununless
release_commitequalsgithub.sha, and every build and smoke jobneeds
verify-version. Checking outgithub.shain those jobs builds thesame commit as before. It also tells CodeQL that the job runs the code of
the run's own ref, which CodeQL trusts. The second commit holds only this
change, so it can be dropped on its own if you would rather dismiss the
alerts.
Changes
sccache: "true"and the Pyodide
actions/cachestep. Each setup-uv step now setsenable-cache: false. Each setup-node step dropscache: pnpmand setspackage-manager-cache: false, because setup-node caches npm projects onits own. Every setup-uv step keeps
prune-cache: true, which the toolchainvalidator still requires.
github.shain the jobs CodeQL flags: the citry-corelinux,musllinux,macos,sdist, andpyemscripten-buildjobs, pluswindows, which has the same shape (CodeQL does not read itspwshsteps). Also the
buildandsmoke-pythonjobs of citry, citry-lsp,citry-ui, and pygments-citry, and the VS Code
buildandsmoke-installed-extensionjobs.scripts/validators/release_caches.py(new) reads every*--publish.ymlworkflow. It reports cache actions, anycacheorsccacheinput that is not false, a setup-uv or setup-node step thatleaves its default cache on, and sccache turned on through
env:. Testsare in
packages/py/citry/tests/test_release_caches_validator.py.docs/codebase.md, "Publishing" gains one paragraph on the rule. Eachpublish workflow's header comment gains a three-line note.
Time cost for release runs
I took the numbers from two citry-core qualify runs of 2026-11-02: one where
sccache found nothing (41463054673) and one where it found most
crates (41509159532). The first wheel build in each job is the one
sccache affects.
linux (x86), about 26 minutes in both runs, and sccache never got a hitthere. The slowest other jobs ran about 17 minutes with no hits, which is
still shorter.
Those hits only happen when the same source tree is qualified again. The
first qualify run for a new release commit already found nothing in the
cold run above.
job (about 34 s to restore nothing and install, against 13 s to restore and check
it). Those jobs take about 7 minutes, well under the longest job.
pnpm installshould add tens of seconds per Node job, including the VSCode promotion job. I did not measure this.
The total time of a qualify run depends mostly on when runners pick up its 22
jobs (54 minutes in the cold run, 42 in the warm one, with the same longest
job). Nothing here is expected to add more than a minute to the longest path.
Merging with the #590 and #589 branches
Other branches are editing
scripts/release.pyand the publish and verifysteps of these workflows (#590), and the VS Code publish steps (#589). To
keep the merge clean, this PR changes only:
ref:line of the checkout step in the jobs listed above;It leaves the publish, verify, and promote steps alone.
verify-version, theverify-distributionsandverify-extensionjobs, and the promote-modereleasejobs still check outinputs.release_commit. In promote modemainmay have moved on, soreleasemust keep it. CodeQL does not flag theverify jobs.
Checks
scripts/validate.py: every validator passes, including the newrelease_caches.release_cachesrun against the workflows onorigin/mainreports 35cache uses, so it catches the old state.
run-expression, CI workflow, and release controller tests: 142 passed.
actionlinton the six publish workflows: no findings.ruff check,ruff format --check, andmypyon the new files: clean.alerts should close once it analyses
mainafter the merge.Not covered
mainstill saves caches that later CI runs restore. Thataffects test results, not released bytes, and the task was to keep it.
repo--docs-deploy.yml,repo--docs-release.yml)still use sccache, Rust, pnpm, and image caches. They publish the website,
not packages, so I left them alone. Say if you want the same rule there.
🤖 Generated with Claude Code