-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip cache always uses node process architecture, ignoring architecture key #971
Comments
Hello @alex 👋, |
Hello @alex , This change, introduced in PR #896, adds the architecture to the pip cache key. This approach enhances caching efficiency by preventing cache thrashing when switching between different Python architectures (e.g., x86_64 and arm64). As a result, builds become faster, and multi-architecture workflows are better supported. Please validate this from your end and share any further inputs to confirm the exact requirement. |
No, that PR does not address this issue. If you look, you will also see that that PR was merged before I filed this. That PR makes use of the node processes' architecture. But what I requested is the Python binary architecture. On Windows, these can differ. On Windows, both x86 (32-bit) and x86-64 (64-bit) Python binaries can be installed, and the node process architecture will always be 64-bit. We need to include the Python binary's architecture, which is specified with the |
Hello @alex, Thank you for the clarification. We will review the proposed change and get back to you with feedback soon. |
Hello, Thank you for submitting this feature request and providing such a detailed explanation. After careful consideration, we’ve decided not to proceed with this change as it could potentially disrupt existing workflows, especially those relying on shared caches across different architectures. While we understand the benefits of more accurate caching, maintaining the stability of current workflows is our priority at this time. We appreciate your suggestion and will continue to assess any future opportunities for improvement. Thank you for your understanding, and we look forward to your continued input! |
I'm not sure I follow how this could disrupt existing workflows. Can you explain more? |
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:
Runner type:
Tools version:
All
The text was updated successfully, but these errors were encountered: