Skip to content

uv sync fails due to invalid cache #12274

@vlaci

Description

@vlaci

Summary

It started happening right after upgrading from 0.6.5 to 0.6.6.

In our environment, ~/.cache/uv is cached between CI runs. My theory is that for some time uv 0.6.5 ran alternating with 0.6.6 on different branches sharing the same cache, as the issue did not happen when 0.6.6 was first introduced.

The error itself is very similar to the one fixed in #11105, but it comes from a different place:

$ uv sync --frozen --no-dev --extra xyz
error: Failed to determine installation plan
Caused by: Failed to deserialize cache entry
Caused by: array had incorrect length, expected 4

After a cursory glance at the code of Planner.build(), it looks like caching didn't get the same treatment in {Http,Local}ArchivePointer::read_from() as SourceDistributionBuilder::url_metadata() got in #11105

Platform

Debian 12 (bookworm)

Version

uv 0.6.6

Python version

CPython 3.11.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions