libfetchers: namespace input fingerprint by scheme#16061
Conversation
|
Hm, maybe #9480 is not working correctly? |
|
Probably due to the fact that the |
|
In Jitsi, did you mean that this patch will cause different fetchers to not be able to share cache even if the fetched content is the same (due to the namespacing), and the correct solution is to fix |
|
apparently export-ignore is not the only thing that might cause problem and it seems like export-subst is also problematic |
Right, there are lots of things that can go wrong.
I wouldn't really call that a correct solution. I guess the big question is whether we even want to continue playing along with the notion that fetchers can be interchangeable (as was intended, probably by Eelco). I'm not sure I'm the right person to make this call, but there's a whole unreproducivility mess to untangle. The whole caching scheme relies on the fetchers being reproducible (which they aren't). |
If not this PR can be merged as is no? (jk 😂) If we want to minimize the blast radius for now, would adding a discriminator to if (auto rev = input.getRev())
return std::string(schemeName()) + "-archive:" + rev->gitRev();
else
return std::nullopt; |
I guess if we want to be really conservative we could use the same scheme that |
|
I'm a bit reluctant on just adding At least at the moment, github fingerprint and git (with export ignore set) are not interchangeable |
Ideally that would also be supported. (That was also noted in the PR adding export-ignore support) and the hash mismatch does provide a useful canary, while being annoying to users. Either way, that's a bug in the fetchers. I'm afraid that if we were to make those not interchangeable this will bitrot forever... Let's see what @roberth has to say. |
xokdvium
left a comment
There was a problem hiding this comment.
I still think that this is quite sad, but realistically it seems that playing whack-a-mole isn't going to work out. In case anyone ever wants to reintroduce a more sound approach in future - that's easily done without breakage.
Let's try this for now. Just the fact that we are only running into this now might suggest that the benefit of sharing the cache isn't all that worth it.
Motivation
i've been getting hash mismatch errors almost daily when there's update on flake input from dependabot and that dependency have a local checkout
Context
see https://github.com/stepbrobd/nix-cache-hash-mismatch-mre
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.