Skip to content
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 fails sometimes (not reproducable) to deserialize cache entries #11101

Closed
cwiede opened this issue Jan 30, 2025 · 2 comments · Fixed by #11105
Closed

uv fails sometimes (not reproducable) to deserialize cache entries #11101

cwiede opened this issue Jan 30, 2025 · 2 comments · Fixed by #11105
Labels
bug Something isn't working

Comments

@cwiede
Copy link

cwiede commented Jan 30, 2025

Summary

Unfortunately I cannot reproduce this issue consistently at the moment, but in the last days I got errors

Failed to deserialize cache entry
array had incorrect length, expected 5

when trying to uv pip install a directory in editable mode. I can perform a uv cache clean as a workaround, but I wonder, if there is any option to make these kind of errors warnings such that the corresponding cache entries can be ignored (maybe it should even be the default behaviour)?

I switch between the uv/python versions as noted below.

Platform

Ubuntu 20.04

Version

0.5.18, 0.5.25

Python version

3.10.14, 3.10.16, 3.9.21

@cwiede cwiede added the bug Something isn't working label Jan 30, 2025
@zanieb
Copy link
Member

zanieb commented Jan 30, 2025

Thanks for the report.

I think this is a duplicate of #11043

Not sure what is going on here yet.

@cwiede cwiede closed this as completed Jan 30, 2025
charliermarsh added a commit that referenced this issue Jan 30, 2025
## Summary

If we fail to deserialize cached metadata in the cache, we should just
ignore it, rather than failing.

Ideally, this never happens. If it does, it means we missed a cache
version bump. But if it does happen, it should still be non-fatal.

Closes #11043.

Closes #11101.

## Test Plan

Prior to this PR, the following would fail:

- `uvx uv@0.5.25 venv --python 3.12 --cache-dir foo`
- `uvx uv@0.5.25 pip install ./scripts/packages/hatchling_dynamic
--no-deps --python 3.12 --cache-dir foo`
- `uvx uv@0.5.18 venv --python 3.12 --cache-dir foo`
- `uvx uv@0.5.18 pip install ./scripts/packages/hatchling_dynamic
--no-deps --python 3.12 --cache-dir foo`

We can't go back and fix 0.5.18, but this will prevent such regressions
in the future.
@cwiede
Copy link
Author

cwiede commented Jan 30, 2025

Thank a lot both for the outstanding tool and outstanding support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants