NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.1k stars 291 forks source link

expose .drv of each build #1306

Open raboof opened 8 months ago

raboof commented 8 months ago

Is your feature request related to a problem? Please describe. There have been cases where Hydra's .drv differed from what was reproduced locally, and we couldn't find why. The outPath didn't differ, so there was not that much incentive to investigate further. However, if someone would like to dig into this further, it would be helpful to provide access to the contents of the .drv on Hydra.

Describe the solution you'd like On the 'Details' tab of a build, the 'Derivation store path' should be a link, and clicking that link should download the .drv

Ericson2314 commented 6 months ago

I would very much like if the resolved drv (i.e. with all the inputDrvs converted to inputSrcs) was uploaded into the binary cache too, because it is good for CA/derivations auditing purposes.

Ericson2314 commented 6 months ago

CC @flokli will this just make caching size problems worse or is it is OK to think about?

flokli commented 6 months ago

In terms of storage size, the derivations are stored as NAR-encoded ATerms. They're fairly small, it shouldn't be an issue for the storage consumption.

However, there can be multiple .drv resulting in the same outPath (for FODs), so the existing model is a bit insufficient, at least it can't answer the question how a certain .drv was produced.

The Deriver field in the .narinfo file can only point to one Derivation, and points to the one that was used to /first/ build that store path. So it can only be used to answer the question what .drv Hydra used while building that store path.