Seed pip caches for docs on main/3.x branches#153127
Open
hugovk wants to merge 1 commit into
Open
Conversation
itamaro
approved these changes
Jul 5, 2026
zware
approved these changes
Jul 5, 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.
Our GitHub Actions cache is always full:
https://github.com/python/cpython/actions/caches
Right now, PR caches use up 3.54 GB across 52 PRs:
They tend to get evicted after about a day due to the storage limit, and don't last the full 7-day limit.
But why are there so many caches for PRs?
Nearly all of this is pip caches from docs builds, and they're virtually identical.
There's also about Hypothesis cache of about 6 MB for the
mainbranch. For Hypothesis, PRs usually use themaincache and don't need to write their own cache.However, the docs workflow only runs for PRs, so
main/3.*branches never get to save a cache. If they had, the vast majority would just use a cache frommainand carry on. No need to save their own PR cache.We can do this by letting this workflow run on
mainand3.*, and also limit to only run if one of these files change:Doc/pylock.tomlDoc/requirements.txt.github/workflows/reusable-docs.yml