-
Notifications
You must be signed in to change notification settings - Fork 581
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
PyPy3 wheels not uploaded to cache -> very slow builds #288
Comments
Hello @hugovk. Thank you for your report. If I've understood well you want to add the primary as for |
I don't understand why it's failing to upload the updated cache, but yes, I think that's one way to fix it: setup-python/src/cache-distributions/pipenv-cache.ts Lines 34 to 36 in 280924f
|
I'm now hitting this in other repos, for example: I believe this is happening:
This then repeats for other PyPy jobs and subsequent builds In fact this means only one job is using the cache; jobs for other CPython versions don't find a wheel for their CPython version in the cache, so have to always download a fresh wheel from PyPI. Whilst this is much faster than building an sdist, it does mean the cache isn't being used and large wheel files are being downloaded every time. In the example above:
Prior to using |
Please see PR #303. |
Description:
Wheels built by PyPy3 aren't being cached. This makes the PyPy3 build very slow as it rebuilds them every time.
Action version:
v2 = v2.3.1
Platform:
Runner type:
Tools version:
PyPy 7.3.7 with Python (3.8.12)
(Also Python 3.7-3.10 in the matrix)
Repro steps:
I'm not entirely sure how the current state came about but:
pypy-3.8
requirements.txt
is installed. Some pure Python wheels are installed from cache, but a number of sdists are downloaded: matplotlib-3.5.0.tar.gz, kiwisolver-1.3.2.tar.gz, Pillow-8.4.0.tar.gzExpected behavior:
I expect after the wheels are build the first time, the pip cache is uploaded with actions/cache for next time.
Actual behavior:
The pip cache is never uploaded for PyPy3.
"Post Set up Python pypy-3.8" shows either:
https://github.com/hugovk/drop-python/runs/4384155862?check_suite_focus=true
Or:
https://github.com/hugovk/drop-python/runs/4383955419?check_suite_focus=true
I see the cache key is calculated from the runner OS (e.g. Linux), the package manager (e.g. pip or pipenv) and the hash of the dependency path:
setup-python/src/cache-distributions/pip-cache.ts
Lines 38 to 40 in 280924f
For a given OS, pip should be able to handle caching different Python versions in the same cache dir. However, there seems to be some sort of race condition here.
Before using this new caching I used to include the Python version in the cache key:
Perhaps this would help here too?
The text was updated successfully, but these errors were encountered: