-
Notifications
You must be signed in to change notification settings - Fork 760
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
uv 0.4.12 failing to read distribution cache in github actions #7543
Comments
At least on a first pass I can't reproduce that locally, but I'll keep trying. |
Actually, I think I have an idea as to how this could happen if you're sharing that cache between multiple Python versions. Is that possible? I reproduced with some manual cache editing:
|
Ah, that is most likely it. We use multiple Python versions, and I didn't realize that the cache key doesn't include it. |
I feel like the cache should be robust to multiple Python versions |
Yeah it should. |
In general it is robust to multiple Python versions, platforms, etc. But there's a bug here whereby if you run |
I'll fix this today. |
It doesn't make sense share the cache of complied wheels becuase these are version specific. See also astral-sh/uv#7543
In our case, the GitHub cache really should be per Python version, so I've just changed that. Without that, it is not really useful as compiled wheels are not compatible across Python versions. |
## Summary `uv cache prune --ci` will remove the source distribution directory. If we then need to build a _different_ wheel (e.g., you're building a package that has Python minor version-specific wheels), we fail, because we expect the source to be there. Now, if the source is missing, we re-download it. It would be slightly easier to just _ignore_ that revision, but that would mean we'd also lose the already-built wheels -- so if you ran against many Python versions, we'd continuously lose the cached data. Closes #7543. ## Test Plan We can add tests, but they _need_ to build non-pure Python wheels, which tends to be expensive... For reference: ```console $ cargo run venv --python 3.12 $ cargo run pip install mercurial==6.8.1 --verbose $ cargo run cache prune --ci $ cargo run venv --python 3.11 $ cargo run pip install mercurial==6.8.1 --verbose ``` I also did this with a local `.tar.gz` that I downloaded from PyPI.
This seems almost like #7485, but I still see it happen with 0.4.12:
The cache was created by 0.4.12 as uv version is in GitHub cache key:
When executed without a cache, it runs just fine.
PS: Action log can be seen here: https://github.com/WeblateOrg/weblate/actions/runs/10940191066/job/30372045488
The text was updated successfully, but these errors were encountered: