Skip to content

[Question] Substitutable derivations reported as "not built" #403

@bbenne10

Description

@bbenne10

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions