Skip to content

ci(release): give the preflight step pyyaml (ubuntu-26.04 runners lack it) - #911

Merged
antosubash merged 2 commits into
mainfrom
fix/release-preflight-pyyaml
Nov 11, 2026
Merged

antosubash merged 2 commits into
mainfrom
fix/release-preflight-pyyaml

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • The release workflow (run 42976079074) failed in preflight with ModuleNotFoundError: No module named 'yaml'. uv run --no-project --with tomlkit layers packages over the runner's interpreter. The last good run (Nov 6) was on ubuntu-24.04, where the system Python 3.12 shipped PyYAML. ubuntu-latest is now ubuntu-26.04, which has no system 3.12, so uv downloads a bare CPython, and the import yaml in scripts/check_metadata.py fails. No repo change caused it.
  • Fix: add --with pyyaml to the preflight step.
  • New test, scripts/tests/test_scripts_release_preflight_deps.py, walks the imports reachable from scripts.release_preflight and requires every third-party import to be declared with --with. The test fails if --with pyyaml is removed.

Verification

  • Reproduced on a uv-managed 3.12 (--isolated --python-preference only-managed): the old command raises the same ModuleNotFoundError, and the new command exits 0 against PyPI.
  • Local CI: make lint passes, make test-py has 8324 passed and 28 skipped, make test-js has 906 passed.
  • Reviews: Sonnet (correctness and maintainability) and Codex. The parser hardening and the from scripts import X fix are in.
  • Verification report: https://claude.ai/artifact/6YNazazj1dPzebgR8T56wP

Report links are Claude Artifacts and start private. The author can share them from claude.ai/code/artifacts if reviewers need access.

CI-only change, so there is no CHANGELOG entry.

Test plan

  • CI is green
  • The next release dispatch gets past preflight

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

…longer provide it

uv run --no-project layers --with packages over the runner's interpreter.
ubuntu-24.04's system Python 3.12 shipped PyYAML, so scripts.check_metadata's
import yaml worked by accident; ubuntu-26.04 has no system 3.12, uv downloads
a bare CPython and the preflight dies with ModuleNotFoundError.

Adds a test that every third-party import reachable from
scripts.release_preflight is declared with --with on that step.

Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Parse --with=X, comma lists and version specifiers; follow
`from scripts import X`; explicit assertion when the step is missing.

Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 57abecd
Status: ✅  Deploy successful!
Preview URL: https://2b123497.simple-module-python.pages.dev
Branch Preview URL: https://fix-release-preflight-pyyaml.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-11T07:26:11.240447Z 57abecd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@antosubash
antosubash merged commit 012dad8 into main Nov 11, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant