Conversation
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
zanieb
approved these changes
Mar 28, 2024
BurntSushi
added a commit
that referenced
this pull request
Mar 28, 2024
It turns out that #2712 did _not_ fix #2711. After I put up #2712, I started trying to track down the specific change that caused the failure. I had assumed at first that it was related to one of our `rkyv` types, but it actually ended up being one of our msgpack caches. I think the failure mode is still fundamentally the same idea: the cached data changed in a way that is still valid msgpack, but got interpreted differently after deserializing. The specific change that caused this was the [removal of a field] from our metadata type. Ideally we would just undo the change and add the field back. But that change has already been shipped out to users. So I believe the only plausible choice at this point is to bump the `built-wheels` cache. This will unfortunately mean that `uv` will need to re-build wheels. Fixes #2711 [removal of a field]: 365c292#diff-e42586829f9c2cdbb909bedc5cf95691cc415247f2cbc2ebeb80d887020457bbL29
zanieb
pushed a commit
that referenced
this pull request
Mar 28, 2024
It turns out that #2712 did _not_ fix #2711. After I put up #2712, I started trying to track down the specific change that caused the failure. I had assumed at first that it was related to one of our `rkyv` types, but it actually ended up being one of our msgpack caches. I think the failure mode is still fundamentally the same idea: the cached data changed in a way that is still valid msgpack, but got interpreted differently after deserializing. The specific change that caused this was the [removal of a field] from our metadata type. Ideally we would just undo the change and add the field back. But that change has already been shipped out to users. So I believe the only plausible choice at this point is to bump the `built-wheels` cache. This will unfortunately mean that `uv` will need to re-build wheels. Fixes #2711 [removal of a field]: 365c292#diff-e42586829f9c2cdbb909bedc5cf95691cc415247f2cbc2ebeb80d887020457bbL29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aselection of data types in
uv. Changing those data types withoutbumping 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
rkyvvalidation, but changed how the data itselfis interpreted. Our cache is robust with respect to
rkyvvalidation(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
rkyvvalidation (orinstead 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