setup-python: Post setup Python step fails (pipenv cache)
Description: A clear and concise description of what the bug is.
Hey! So this used to work just a few days ago. We’ve been having some issues with cache in the last few days (see here for details), this is a brand new issue which I think might or might not be related to the previous problem. Simply put, the action fails in the post step with the following message.
Post job cleanup.
[2](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:20:2)
Error: Cache folder path is retrieved for pipenv but doesn't exist on disk: /home/runner/.local/share/virtualenvs
Here’s the actual step:
Run actions/setup-python@v3.1.2
[2](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:2)
with:
[3](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:3)
cache: pipenv
[4](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:4)
python-version: 3.9.13
[5](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:5)
token: ***
[6](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:7)
Successfully setup CPython (3.9.13)
[7](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:8)
pipenv cache is not found
Action version: Specify the action version
3.1.2
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
3.9.13
Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
Expected behavior: A description of what you expected to happen.
No issue occurs, the same way it used to work a week ago.
Actual behavior: A description of what is actually happening.
This error message appears on every run.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 11
- Comments: 23 (3 by maintainers)
Commits related to this issue
- Fix: [GitHub][workflows] インストーラーのビルドに失敗する不具合を修正 ref: https://github.com/actions/setup-python/issues/436 — committed to tsukumijima/KonomiTV by tsukumijima 2 years ago
- Remove pipenv cache from ECR workflows Why these changes are being introduced: There is a known bug in `actions/setup-python` related to caching: https://github.com/actions/setup-python/issues/436 th... — committed to MITLibraries/.github by cabutlermit a year ago
- fix: disable pipenv caching due to bug in workflow - there is a [bug](https://github.com/actions/setup-python/issues/436) in the setup-python action — committed to bweigel/aws-lambda-tesseract-layer by bweigel a year ago
- fix: disable pipenv caching due to bug in workflow (#151) - there is a [bug](https://github.com/actions/setup-python/issues/436) in the setup-python action — committed to bweigel/aws-lambda-tesseract-layer by bweigel a year ago
- 💚 Disable setup-python pip cache in CI (#9438) — committed to tiangolo/fastapi by tiangolo a year ago
- Remove pip cache due to known windows bug: https://github.com/actions/setup-python/issues/436 — committed to UCL/TDMS by willGraham01 a year ago
- Update CI to produce unit test `.mat` and `.hdf5` data (#289) * Move content of benchmark_scripts readme into doc/developers * Update CI attempt 1 * Actually use the right syntax * Force pyt... — committed to UCL/TDMS by willGraham01 a year ago
- Update CI to produce unit test `.mat` and `.hdf5` data (#289) * Move content of benchmark_scripts readme into doc/developers * Update CI attempt 1 * Actually use the right syntax * Force pyt... — committed to UCL/TDMS by willGraham01 a year ago
- `DispersiveMultiLayer` no longer uses MATLAB (#286) * Rework DispersiveMultiLayer class into a struct. TDMS builds. - xyz_vector struct of 3 vector<double>s introduced - DispersiveMultiLayer is n... — committed to UCL/TDMS by willGraham01 a year ago
- `DispersiveMultiLayer` no longer uses MATLAB (#286) * Rework DispersiveMultiLayer class into a struct. TDMS builds. - xyz_vector struct of 3 vector<double>s introduced - DispersiveMultiLayer is now ... — committed to UCL/TDMS by willGraham01 a year ago
- `DispersiveMultiLayer` no longer uses MATLAB (#286) * Rework DispersiveMultiLayer class into a struct. TDMS builds. - xyz_vector struct of 3 vector<double>s introduced - DispersiveMultiLayer is now ... — committed to UCL/TDMS by willGraham01 a year ago
- `DispersiveMultiLayer` no longer uses MATLAB (#286) * Rework DispersiveMultiLayer class into a struct. TDMS builds. - xyz_vector struct of 3 vector<double>s introduced - DispersiveMultiLayer is now ... — committed to UCL/TDMS by willGraham01 a year ago
- `DispersiveMultiLayer` no longer uses MATLAB (#324) * `DispersiveMultiLayer` no longer uses MATLAB (#286) * Rework DispersiveMultiLayer class into a struct. TDMS builds. - xyz_vector struct of 3 ve... — committed to UCL/TDMS by samcunliffe a year ago
The error occurs when the job specifies the use of cache but in fact is not using it. Should this affect the entire job? Can the error be converted to a warning so a job is not considered failed?
Same for me.
I’m seeing this error too.
At the risk of sounding very obvious, but maybe this’ll help someone in any case:
We ran into this issue recently. (For example; see here.)
What ‘fixed’ it for us was the realization that whenever this issue occurred, the workflow as a whole needed to skip all the steps that actually required python and/or pip – and then to disable the setup-python step as well whenever that was the case.
(That might also be going on with the reproduction of others’ but in a more subtle way: All of the actions taken that I can see here are for packages that are likely to be included and at latest version anyway, so the cache might never get written to. Again, sorry if that was already obvious.)
In any case, however inelegant it may be, setting up something, not using it, and then cleaning it up again should probably (also) not result in an error. (Just putting that out there, since that is a slightly different case than what OP is talking about, which may or may not require a different approach to solve.)
Hi @dmitry-shibanov no updates beyond that this is still an issue. I tried removing the
cache
key which obviously removes the error but after adding it back, the error came back too. So I am stuck it seems between not having caching or receiving this error. I don’t have this confirmed yet, but I suspect this error happens only on themaster
branch and not in other branches. Also this is interesting to me, after I added back thecache
key, the next run produced this:And then in post step