Repository navigation
ci: warn near package size caps and print the release restart command - #609
Merged
Merged
Conversation
Refs #608. - Add scripts/check_package_sizes.py. The wheel build job runs it before the release checks. It prints each built file's size next to its cap and writes a GitHub Actions warning at 90 percent of the cap. Each cap is read from the verifier that enforces it. - Print the command that starts a release again, with the candidate run ID, after any error that stops publication. - Document the route for fixes built in private security advisories, the wait for CI on main, and the gh commands that start a release candidate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Refs #608. This pull request covers items (a), (b), (c), and (f), and the documentation half of (e). Item (d) and the
scripts/release.py candidateidea in (e) stay open in the issue.What changed
docs/codebase.mdgets a section, "Releasing advisory fixes". It says why the fixes have never run in CI, the order to land them in (one chain of commits, a fast-forward ofmain, close each advisory's fork pull request), and to wait for the test runs onmainto pass before raising versions. No code enforces the wait, as decided in the issue. "How changes reachmain" now points to the section as the one change a person makes that does not go through a pull request.scripts/check_package_sizes.pyprints the size of each built package file next to its release cap and writes a::warning::for a file at 90 percent of its cap or more. It reads each cap from the verifier that enforces it (MAX_WHEEL_BYTESorMAX_SDIST_BYTES), so no number is copied. Tests use synthetic files. They change each cap in its verifier and check that the report follows, and they fail when a verifier gains a cap or an expected release file that the script does not list.maininscripts/release.pynow prints the command, with the candidate run ID filled in, after any error that stopspublish, plus a note that a failure that is not a short outage fails again until its cause is fixed. Starting again re-checks everything and is safe after any failure, once every publish run has finished, so the command is not limited to outages. A failure before the controller starts on the candidate (a missing token, an unreadable candidate file) and a failed qualification, which has no candidate yet, print no command.gh workflow run repo--release-candidate.ymlcommand and how to find a candidate's run ID.Item (b): where it runs and what it costs
It runs in the
citry-ui-wheel-buildjob ofpy--tests.yml, which already builds the package files that have a size cap, except the VS Code extension's. That job is a required check onmain, and it runs on pull requests that change Python inputs and on pushes tomain. The new step reuses the files that job already built and adds no build. On a laptop it took about 0.1 seconds, and the runner adds a second or two to start a step.The step runs before the release checks, so one run lists every package even when the first check then fails on a file over its cap. To get that order, the LSP and Pygments
uv buildcommands moved from the check step into their own step ahead of the report. The builds are the same and take about a second each. Both path lists in the workflow name the new script, and the existing test that compares them still passes. A new test checks the step order and that the step's file patterns match what the builds write.The script only warns. The release checks still fail a file over its cap, except for the citry-ui source distribution, which only release qualification checks. For that file, the warning is the one notice a pull request gives. The VS Code extension is not built in this job, so it has no warning.
Checks run
ruff checkandruff format --checkonscripts/and the touched tests.mypyon the touched files, on macOS and with--platform linux.pytestontest_package_size_check.py,test_release_controller.py,test_ci_workflows.py,test_pypi_release.py,test_toolchain_validator.py,test_repo_check_script.py, andtest_release_caches_validator.py.scripts/validate.py(all validators).For the maintainer
scripts/release.py, which is in the path list of Prepare release candidate. It starts a run onmain, as ci: let a release recover from a registry or signing outage #592 did. Every package version already has a tag, so that run ends in itsno-releasejob.🤖 Generated with Claude Code