Skip to content

Errors out on pip cache (no changes, worked fine until now) #1593

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

Open
DFi-DeepakMishra opened this issue Apr 16, 2025 · 1 comment
Open

Comments

@DFi-DeepakMishra
Copy link

In the actions workflow the below snippet is present to cache the pip dependencies, now getting the below error while inserting anything in the mentioned directory. This was working fine till now, from today onwards it is throwing the error.

Code snippet:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.9"
cache: "pip"
- name: dependencies
shell: bash
working-directory: mechanic/snowflake/snowddl
run: pip install -r requirements.txt

Error:

Run actions/setup-python@v3
Successfully setup CPython (3.9.21)
/opt/hostedtoolcache/Python/3.9.21/x64/bin/pip cache dir
/home/runner/.cache/pip
Error: Cache service responded with 422

Is there any supported cache service shutdown happened recently?

@AdnaneKhan
Copy link

In the actions workflow the below snippet is present to cache the pip dependencies, now getting the below error while inserting anything in the mentioned directory. This was working fine till now, from today onwards it is throwing the error.

Code snippet: runs: using: "composite" steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 with: python-version: "3.9" cache: "pip" - name: dependencies shell: bash working-directory: mechanic/snowflake/snowddl run: pip install -r requirements.txt

Error:

Run actions/setup-python@v3
Successfully setup CPython (3.9.21)
/opt/hostedtoolcache/Python/3.9.21/x64/bin/pip cache dir
/home/runner/.cache/pip
Error: Cache service responded with 422

Is there any supported cache service shutdown happened recently?

TLDR: Update to setup-python v4 or v5, GitHub deprecated the old cache backend and any actions using caching that use the old cache library will fail.

See #1510 (reply in thread). I tried asking if they were backporting to older versions but they did not see heavy usage.

GitHub backported the cache code to the following versions:

actions/setup-dotnet	v3
actions/setup-go	v4
actions/setup-go	v3
actions/setup-go	v5
actions/setup-java	v3
actions/setup-java	v4
actions/setup-node	v3
actions/setup-node	v4
actions/setup-python	v4
actions/setup-python	v5

Any older versions will fail. I actually thought the failure would be more graceful, e.g. caching fails but the job still completes. They def should have formally announced a deprecation of the older setup-* versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants