fix(ci): don't request the pip cache when no Python manifest exists#330
Merged
Conversation
reusable-ci.yml's Python job set `cache: pip` unconditionally. actions/setup-python fails the job outright when no requirements.txt or pyproject.toml is present, so any repo that gained its first Python file without a dependency manifest went red - a single stdlib-only script is enough to activate the job. Found during the TODO fan-out: adding scripts/assemble_todo.py to falkcorp/cockroach-rollout-agent, which has zero Python files and no manifest, turned that repo's previously green CI red. The manifest is detected first and the pip cache requested only when there is something to cache; otherwise setup-python runs uncached and emits a notice. Verified the detection both ways (a tree with a requirements.txt resolves to cache=pip, an empty one to no cache), and actionlint passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013vU67T2LJDCbYTBs9ZFAf2
jdfalk
added a commit
to falkcorp/cockroach-rollout-agent
that referenced
this pull request
Jul 20, 2026
Picks up falkcorp/github-common#330, which stops setup-python from failing when a repo has Python sources but no dependency manifest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013vU67T2LJDCbYTBs9ZFAf2
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
reusable-ci.yml's Python job setcache: pipunconditionally.actions/setup-pythonfails the job outright when it finds norequirements.txtorpyproject.toml:So any repository that acquires its first Python file while having no dependency
manifest goes red — a single stdlib-only script is enough to activate the job.
Found during the TODO fan-out: adding
scripts/assemble_todo.pytofalkcorp/cockroach-rollout-agent— a repo with zero Python files and nomanifest, whose CI on
mainwas green — turned it red. The fan-out surfaced thebug, but it was latent for any repo in this situation.
Fix
Detect the manifest first, and request the pip cache only when there is
something to cache. Otherwise
setup-pythonruns uncached and emits a notice.Testing
requirements.txtresolves tocache=pip; an empty tree resolves to no cache.actionlintpasses on the modified workflow.🤖 Generated with Claude Code
https://claude.ai/code/session_013vU67T2LJDCbYTBs9ZFAf2