From c72d3d73d5649d96fd5d8ca47e38c11219756fe7 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Thu, 28 Mar 2024 13:29:29 -0400 Subject: [PATCH] uv-cache: bump simple cache version (#2712) It seems likely that we forgot to bump the version of the "simple" cache in the 0.1.25 release. I'm still working on confirming it, but I figured I'd get this bump up first. The main problem here is that our "simple" cache is represented by `rkyv`, and that in turn is tightly coupled to the representation of a selection of data types in `uv`. Changing those data types without bumping the cache version can result in cache deserialization errors like this, or in the worst case, silent logic errors. One possibility here is that the representation changed in a way that permitted it to pass `rkyv` validation, but changed how the data itself is interpreted. Our cache is robust with respect to `rkyv` validation (if it fails, the cache will invalidate the entry and self-heal), but being robust to higher level logical errors in interpretation of the data is a much more significant challenge. Our best bet there is perhaps some kind of checksum that we could do on top of `rkyv` validation (or instead of it), and thus convert silent logical changes in how the data is interpreted into failure modes that we're already robust to. Fixes #2711 --- crates/uv-cache/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-cache/src/lib.rs b/crates/uv-cache/src/lib.rs index 9ab8ec315..c8b694742 100644 --- a/crates/uv-cache/src/lib.rs +++ b/crates/uv-cache/src/lib.rs @@ -598,7 +598,7 @@ impl CacheBucket { Self::FlatIndex => "flat-index-v0", Self::Git => "git-v0", Self::Interpreter => "interpreter-v0", - Self::Simple => "simple-v5", + Self::Simple => "simple-v6", Self::Wheels => "wheels-v0", Self::Archive => "archive-v0", }