We're building and caching a large number of NixOS system derivations by way of nix-fast-build in our CI infrastructure. We have recently noticed that unchanged system derivations were being downloaded during nix-fast-build's execution path. This caused us to start debugging nix-fast-build with its --debug flag. Adding this flag to the invocation showed that nix-eval-job reports that any derivation in our CI pipeline is NotBuilt. It then attempts to build it, but the build is then substituted by our attic cache! This causes the spurious download, which in our case can be quite large.
We've investigated and it looks like the Drv::queryCacheStatus just calls into queryMissing from NixCPP, but NixCPP seems able to determine that this job can be substituted from the cache. Can someone maybe explain what we're missing here? Why is this not showing the same behavior between nix and nix-eval-jobs? Thank you!
We're building and caching a large number of NixOS system derivations by way of
nix-fast-buildin our CI infrastructure. We have recently noticed that unchanged system derivations were being downloaded duringnix-fast-build's execution path. This caused us to start debuggingnix-fast-buildwith its--debugflag. Adding this flag to the invocation showed thatnix-eval-jobreports that any derivation in our CI pipeline isNotBuilt. It then attempts to build it, but the build is then substituted by our attic cache! This causes the spurious download, which in our case can be quite large.We've investigated and it looks like the
Drv::queryCacheStatusjust calls intoqueryMissingfrom NixCPP, but NixCPP seems able to determine that this job can be substituted from the cache. Can someone maybe explain what we're missing here? Why is this not showing the same behavior betweennixandnix-eval-jobs? Thank you!