Repository navigation
Key the linters' venv cache on the exact Python version - #941
Merged
Merged
Conversation
The cached ./venv links to the interpreter it was built with. Since #917 resolves '3.14' to the latest patch, a new patch release (3.14.9 to 3.14.10) leaves the cached venv pointing at a missing interpreter, and the cache hit skips the install, so 'python -m ruff' runs without Ruff. Include setup-python's resolved python-version in the cache key, so each patch release builds a fresh venv, and update checkout, setup-python, and cache to their current major versions (as proposed in #717). Co-Authored-By: Claude Opus 5.5 <[email protected]>
bzaczynski
approved these changes
Nov 10, 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.
Every PR since about Nov 6 fails
Linux314with:Cause
The
./venvcache key only hashesrequirements.txt. Since #917,python: '3.14'resolves to the latest patch release. The last green run (Nov 4,master) built and cached the venv on 3.14.9. The runners now have 3.14.10, so PRs get a cache hit on the same key (Linux314-v2-pip-c27cd8f7…), the install step is skipped, and the restoredvenv/bin/pythonlinks to a 3.14.9 interpreter that no longer exists. The shell falls through to the toolcache's 3.14.10python, which has no Ruff.#917 bumped the key from
v1tov2for exactly this reason, as did #438 earlier. But with'3.14'the patch version now changes on its own, so a manual bump only fixes it until the next release.Fix
id: setup-pythonand putsteps.setup-python.outputs.python-version(for example,3.14.10) in the cache key andrestore-keys. Each patch release then builds a fresh venv, with no manual bumps.actions/checkoutv2 → v4,actions/setup-pythonv2 → v5, andactions/cachev3 → v4, the same bumps Update GitHub Actions to Latest Versions #717 proposes. The old versions run on deprecated Node runtimes.Once this merges, rerunning the failed checks on #935–#940 should turn them green.
🤖 Generated with Claude Code