fix(release): install PyYAML before the claims registry gate - #421
Merged
Conversation
Both release jobs run scripts/validate_claims.py, which imports yaml. Neither job installed PyYAML, so the step raised ModuleNotFoundError and exited 1 before a tag could be created or an artifact published. Install "pyyaml>=6" ahead of each claims step, matching the gate in validate-claims.yml. The validator needs only PyYAML plus stdlib, so a targeted install keeps the release path free of heavy dependencies. release.yml carries a reviewed SHA-256 in public-artifacts.json; the regenerated inventory is included.
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.
The break
release.ymlrunsscripts/validate_claims.py --check --structure-onlyin twojobs:
create-release-tag(line 145) andpublish-tag(line 285). That scriptimports
yamlat module scope. Neither job installs PyYAML. Both do checkout,setup-python, andsetup-uv, and nothing more, so the step dies immediately:Observed on run
33154231434
against
d139db9. The job reaches it only aftercheck_release_ci.pyhas waited out the full main-branch CI, so each attemptcosts about 45 minutes before it fails.
This step has never passed
Worth being precise, because it changes what the fix is. This isn't a
regression. The step arrived in 9e9c33b (
ci: require release App tag publication, Aug 26) without an install alongside it, and everyrelease.ymlrun since then has failed on it:
The last green release run is 32799646656 on Aug 25, which predates the step.
So no tag has been cut and nothing has been published since the gate went in.
The fix
Install PyYAML immediately before each claims step, copying the pattern and the
reasoning comment from
validate-claims.yml:The claims check itself is untouched. It's a real gate; it just couldn't run.
Installing the whole package would also supply
yaml, but it drags everyruntime dependency into the release path, where a single bad transitive pin
would block publication. The narrow install can't do that.
Sweep of every other
run:in the fileEach release job installs no Python dependencies at all, so I checked whether
anything else in
release.ymlwould fail the same way one step later. Nothingdoes. Every other script is stdlib-only:
scripts/validate_claims.pyyamlscripts/check_release_consistency.pyscripts/check_release_ci.pyscripts/verify_release_publication.pyThe two inline
python -csnippets usetomllib, and the heredoc usesos,re, andsubprocess.uv buildgetsuvfromsetup-uv.Verified by running each one under a venv containing nothing but
pip:And under a venv containing only PyYAML, which is what the fixed step builds:
So the sibling workflow's comment is still accurate: PyYAML plus stdlib, and
the gate passes on current main once it can import.
Wheel gate
release.ymlis itself pinned inpublic-artifacts.json, so editing it changesthe reviewed digest. Regenerated with
python scripts/check_release_consistency.py --write-public-artifact-inventory.The diff is one line, the entry for the file this PR edits:
ci.ymlis not touched, and its pin is unchanged.tests/test_release_contract.pyandtests/test_validate_claims.pypass, 61tests, including the four that read
release.ymldirectly.After merge
1.34.0 can be dispatched.