Open andrewhamon opened 1 month ago
I don't get this issue if I switch from compression=zstd
to compression=gzip
and overwrite the cache. So I think it is an issue specific to using zstd with a cache.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-08-12-nix-team-meeting-minutes-168/50561/1
Discussed during aforementioned Nix maintainers meeting:
We have a test for zstd compression for a binary cache
If this were HTTP, I would ask the following. S3 should be analogous.
What does curl http(s)://your-cache.local/l59dvqj9lbm2n5agfx19hxbm2qlq4w0g.narinfo
return?
It should provide you with a nar.zstd
filename.
If you download that, is it in the correct file format?
Possibly related: https://github.com/NixOS/nix/pull/7712
Possibly related: #7712
My PR was about http transport encoding (this is transparent to nix as curl handles it i.e. it should not appear in narinfo either), but the person here uses zstd compression on the content itself.
If I find some time, I'll see if I can reproduce using minio. Unfortunately, my main specimen was serving production use cases and I already did the cache surgery, so I can't easily grab that info you are requesting.
Describe the bug
When I run
nix build
, I repeatedly get an error about compression when trying to substitute from a private cache.The pnpm package in question is our own package that has this as its src:
Steps To Reproduce
rm result && nix-collect-garbage -d
)--fallback
to the build)Expected behavior
Cache substitutes correctly, or gives better advice on how to rectify the error.
nix-env --version
outputAdditional context
I only hit this when using zstd compression on the cache. The cache is a a gcs bucket (but using a
s3://
cache URI).Priorities
Add :+1: to issues you find important.