actions / actions/setup-python

pip cache always uses node process architecture, ignoring architecture key

Open
#971 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
2.2k
Forks
739
Avg merge
6d 18h
Merged PRs (30d)
1

Description

Description:

The pip caching code uses a cache key that does not include the Python binary's architecture. This leads to cache thrashing.

https://github.com/actions/setup-python/blob/main/src/cache-distributions/pip-cache.ts#L68-L75

These keys should include the Python binary architecture, which is specified with the architecture input to the action.

Action version:
5.2.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
All

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/cache-distributions/pip-cache.ts lines 68-75 and inspect how the pip cache keys are assembled and how the action's architecture input is available. Update the relevant keys to include the Python binary architecture, then verify that different architectures no longer reuse or thrash the same cache key.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.