-
Notifications
You must be signed in to change notification settings - Fork 732
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.11 failing to read distribution cache in github actions #7485
Comments
Seems to be related? #7479 |
After going through the release notes for 0.4.11, I was able to reproduce this locally. This seem to be linked to the newly added NOTE - We don't explicitly invoke $ uv cache clean
Clearing cache at: /home/ashwin/.cache/uv
Removed 14 files (269.7MiB)
$ uv venv venv-1 --python 3.8
Using Python 3.8.19
Creating virtualenv at: venv-1
Activate with: source venv-1/bin/activate
$ uv pip install pyspark==3.2.1 --python venv-1
Resolved 2 packages in 36.30s
Built pyspark==3.2.1
Prepared 2 packages in 17.55s
Installed 2 packages in 25ms
+ py4j==0.10.9.3
+ pyspark==3.2.1
$ tree -L 2 `uv cache dir`/built-wheels-v3/pypi/pyspark/3.2.1/
/home/ashwin/.cache/uv/built-wheels-v3/pypi/pyspark/3.2.1/
├── MlQraUk4JIaysmTs9mj2e
│ ├── metadata.msgpack
│ ├── pyspark-3.2.1-py2.py3-none-any -> /home/ashwin/.cache/uv/archive-v0/LbVUP3RZg8fwvcArKRmt8
│ ├── pyspark-3.2.1-py2.py3-none-any.whl
│ └── pyspark-3.2.1.tar.gz
└── revision.http
3 directories, 3 files
$ uv cache --prune ci
Pruning cache at: /home/ashwin/.cache/uv
Removed 2816 files (887.9MiB)
$ uv venv venv-2 --python 3.8
Using Python 3.8.19
Creating virtualenv at: venv-2
Activate with: source venv-2/bin/activate
$ uv pip install pyspark==3.2.1 --python venv-2
⠙ pyspark==3.2.1 error: Failed to download and build `pyspark==3.2.1`
Caused by: Failed to read from the distribution cache
Caused by: failed to read directory `/home/ashwin/.cache/uv/built-wheels-v3/pypi/pyspark/3.2.1/MlQraUk4JIaysmTs9mj2e/pyspark-3.2.1.tar.gz`
Caused by: No such file or directory (os error 2)
$ tree -L 2 `uv cache dir`/built-wheels-v3/pypi/pyspark/3.2.1/
/home/ashwin/.cache/uv/built-wheels-v3/pypi/pyspark/3.2.1/
├── MlQraUk4JIaysmTs9mj2e
│ ├── metadata.msgpack
│ └── pyspark-3.2.1-py2.py3-none-any.whl
└── revision.http
1 directory, 3 files
|
This happened to us as well. Reverting to 0.4.10 and busting the cache solve the issue. If you re-use a cache done in 0.4.11 with |
Thanks for the report! We'll look into this right away cc @charliermarsh |
I can confirm a similar issue with Gitlab, also using |
I think this comes from #7446 as it happens for me with the package https://pypi.org/project/pytest-clarity/#files which has no wheels |
#7446 is the very likely cause yeah |
Here some output to maybe ease spotting the error: (.venv) ➜ dataworker git:(main) uv cache prune --ci git:(main|⚑7)
Pruning cache at: /Users/mrigal/Library/Caches/uv
Removed 18847 files (587.2MiB)
(.venv) ➜ dataworker git:(main) uv pip uninstall pytest-clarity git:(main|⚑7)
Uninstalled 1 package in 26ms
- pytest-clarity==1.0.1
(.venv) ➜ dataworker git:(main) uv sync --frozen git:(main|⚑7)
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: pytest-clarity==1.0.1
Caused by: /Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1/yE42-NVZgq4lK-UrXRJnS/pytest-clarity-1.0.1.tar.gz does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present in the directory
(.venv) ➜ dataworker git:(main) uv sync git:(main|⚑7)
⠙ faktory==1.1.0 error: Failed to download and build `pytest-clarity==1.0.1`
Caused by: Failed to read from the distribution cache
Caused by: failed to read directory `/Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1/yE42-NVZgq4lK-UrXRJnS/pytest-clarity-1.0.1.tar.gz`
Caused by: No such file or directory (os error 2) And verbose: (.venv) ➜ dataworker git:(main) uv sync -v git:(main|⚑7)
DEBUG uv 0.4.11
DEBUG Found project root: `/Users/mrigal/dev/prospect-server/dataworker`
DEBUG No workspace root found, using project root
DEBUG The virtual environment's Python version satisfies `Python >=3.12`
DEBUG Using request timeout of 30s
DEBUG Found static `pyproject.toml` for: dataworker @ file:///Users/mrigal/dev/prospect-server/dataworker
DEBUG No workspace root found, using project root
DEBUG Ignoring existing lockfile due to mismatched dev dependencies for: `dataworker==0.1.0`
[... noisy output of dependencies listing]
DEBUG Starting clean resolution
DEBUG Found static `pyproject.toml` for: dataworker @ file:///Users/mrigal/dev/prospect-server/dataworker
DEBUG No workspace root found, using project root
DEBUG Solving with installed Python version: 3.12.3
DEBUG Solving with target Python version: >=3.12
DEBUG Narrowed `requires-python` bound to: >=3.12
DEBUG Narrowed `requires-python` bound to: >=3.12
DEBUG Solving split python_full_version == '3.12.*' (requires-python: RequiresPython { specifiers: VersionSpecifiers([VersionSpecifier { operator: GreaterThanEqual, version: "3.12" }]), range: RequiresPythonRange(LowerBound(Included("3.12")), UpperBound(Excluded("3.13"))) })
DEBUG Adding direct dependency: dataworker*
DEBUG Searching for a compatible version of dataworker @ file:///Users/mrigal/dev/prospect-server/dataworker (*)
DEBUG Adding transitive dependency for dataworker==0.1.0: arrow>=1.3.0
[... similar lines]
DEBUG Adding transitive dependency for dataworker==0.1.0: pytest-clarity>=1.0.1
DEBUG Searching for a compatible version of faktory @ file:///Users/mrigal/dev/prospect-server/dataworker/faktory-1.1.0-py3-none-any.whl (*)
DEBUG Found stale response for: https://pypi.org/simple/arrow/
DEBUG Sending revalidation request for: https://pypi.org/simple/arrow/
[... similar lines from pypi]
DEBUG Acquired lock for `/Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1`
-------> Maybe also interesting
DEBUG No cache entry for: https://files.pythonhosted.org/packages/e2/14/c8a7d861262139688fa465d2e27ff7113764d6fa03b15b9c7b666729ea2e/dynaconf-3.2.6-py2.py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/8a/0e/0f755db36f47f96464463385552f8f132a981731356837c9a30a11ab2d35/psycopg-3.2.1-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/24/d3/00e575657422055c4ea220b2f80e8cc6026ab7130372b7067444d1b0ac10/pytest_randomly-3.15.0-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/dd/49/de869130028fb8d90e25da3b7d8fb13e40f5afa4c4af1781583eb1ff3839/pandas-2.2.2-cp312-cp312-macosx_10_9_x86_64.whl.metadata
----->>> See here
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/52/5c/cafa97944de55738a6a2c5a7cee00d073cb80495032d2b112c4546525eca/pytest-clarity-1.0.1.tar.gz
DEBUG No static `pyproject.toml` available for: pytest-clarity==1.0.1 (MissingPyprojectToml)
DEBUG No static `PKG-INFO` available for: pytest-clarity==1.0.1 (MissingPkgInfo)
DEBUG Released lock at `/Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1/.lock`
error: Failed to download and build `pytest-clarity==1.0.1`
Caused by: Failed to read from the distribution cache
Caused by: failed to read directory `/Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1/yE42-NVZgq4lK-UrXRJnS/pytest-clarity-1.0.1.tar.gz`
Caused by: No such file or directory (os error 2) |
Thanks, I’ll take a look. |
We can also just revert that change and re-release, it’s not a critical change. |
Actually, the root cause is possibly deeper. After reverting to 0.4.10, it fixes the behaviour for (.venv) ➜ dataworker git:(main) ✗ uv self update 0.4.10 git:(main|✚1⚑7
info: Checking for updates...
success: Upgraded uv from v0.4.11 to v0.4.10! https://github.com/astral-sh/uv/releases/tag/0.4.10
(.venv) ➜ dataworker git:(main) ✗ uv pip install pytest-clarity git:(main|✚1⚑7
⠙ pytest-clarity==1.0.1 error: Failed to download and build `pytest-clarity==1.0.1`
Caused by: Failed to read from the distribution cache
Caused by: failed to read directory `/Users/mrigal/Library/Caches/uv/built-wheels-v3/pypi/pytest-clarity/1.0.1/yE42-NVZgq4lK-UrXRJnS/pytest-clarity-1.0.1.tar.gz`
Caused by: No such file or directory (os error 2)
(.venv) ➜ dataworker git:(main) ✗ uv sync --frozen git:(main|✚1⚑7
Prepared 1 package in 3ms
Installed 1 package in 1ms
+ pytest-clarity==1.0.1 |
I wouldn’t expect downgrading to help. Once the cache is in a bad state, any version would fail. |
## Summary See: #7485. The test was using `uv pip sync` which doesn't require fetching metadata, and the failure was in fetching metadata.
Thanks for the quick action! I confirm that 0.4.12 fixes the issue! |
Our Github Actions CI started failing with the following error when running
uv pip install pyspark==3.2.1
This started happening after the latest 0.4.11 release.
Workflow Declaration
astral-sh/setup-uv
logsuv pip install ...
complete logsTried reproducing this on my local machine with
uv self update
followed by auv pip install pyspark==3.2.1
but couldn't reproduce the failure.CI Runner Info
The text was updated successfully, but these errors were encountered: