| 4 Mar 2025 |
John Ericson | * I am not quite sure how to divvy up the work, but I am quite sure there is plenty for all 3 of us 😅 | 21:02:56 |
John Ericson | (the exact sandboxing / running code is a bit of a delicate thing I am inclined to poke gently, leaving mostly as a black box, per the above. The goal logic however I am pretty sure is junked up and I am quite happy to take an axe to it :). Thanks to Las's coroutines reworking is is easier to refactor now too) | 21:04:40 |
John Ericson | * (the exact sandboxing / running code is a bit of a delicate thing I am inclined to poke gently, leaving mostly as a black box, per the above. The goal logic however I am pretty sure is junked up and I am quite happy to take an axe to it :). Thanks to Las's coroutines reworking it is easier to refactor now too) | 21:05:08 |
John Ericson | one way to go about it would be to duplicate DerivationGoal for the plane-build/repair/check cases, and then factor out the commonalities from first principles. but it is a bit of a scary large 3x code explosion in the interim | 21:06:20 |
John Ericson | https://github.com/NixOS/nix/issues/12607 here is one other thing that is unrelated to CA / dyn-drv, and so lower priority for me, but a fun one-off project to tackle if anyone is interested | 21:14:25 |
| 5 Mar 2025 |
Picnoir | Hey!
There's a deriver field in the internal DB ValidPaths table. After a brief look in the source, I can see it populated from the narinfos for substitutions and from the builders for local builds.
I see that it's sometimes omitted, but can't pinpoint where it's omitted and why it can be omitted. | 08:23:09 |
Picnoir | Are there cases where some builds don't have drv files? Do anybody here happen to know why some validpaths seem not to have derivers? | 08:23:45 |
| sinan changed their profile picture. | 08:25:27 |
Ilan Joselevich (Kranzes) | Hah, this valid paths thing | 08:35:27 |
Ilan Joselevich (Kranzes) | there's a couple of issues about it | 08:35:47 |
Ilan Joselevich (Kranzes) | I remember that we also were confused about that when working on tvix | 08:36:44 |
Ilan Joselevich (Kranzes) | Let me try to hunt down the notes | 08:37:01 |
Picnoir | Thanks :) | 08:37:33 |
flokli | I think not all narinfos in cache.nixos.org have a deriver set, and even less have the drv itself uploaded in the binary cache too. | 08:37:54 |
Picnoir | Do you know why the deriver is not set? Is it related to the drv file being uploaded to the cache or not (if I remember correctly, there's a flag in the nix config for that)? | 08:39:19 |
Picnoir | * Do you know why the deriver is not set? Is it depending of the drv file being uploaded to the cache or not (if I remember correctly, there's a flag in the nix config for that)? | 08:39:36 |
Picnoir | * Do you know why the deriver is not set? Is it depending on the drv file being uploaded to the cache or not (if I remember correctly, there's a flag in the nix config for that)? | 08:39:55 |
flokli | It might be a hydra setting | 08:41:57 |
flokli | I'm not entirely sure, sorry | 08:42:05 |
Ilan Joselevich (Kranzes) | i suddenly dont remember if the valid paths thing is the same as the valid = true field | 08:43:26 |
Picnoir | Hmm, could this be related to builtins 🤔 | 08:44:40 |
flokli | The valid paths thing is unrelated | 08:47:11 |
Robert Hensing (roberth) | "valid paths" are basically all the registered store paths. I don't think you'll ever get valid = false unless it's missing (but I'm not familiar with all the crimes in the CLI) | 08:47:20 |
flokli | The one way I could see a store path being present without it's drv locally is by `nix-store -r`'ing something from a binary cache without locally evaluating. | 08:48:24 |
Robert Hensing (roberth) | as for deriver, it's best-effort. If it can be preserved somewhere, that would be nice, but it can only tell you the first derivation that produced the output anyway | 08:49:07 |
Robert Hensing (roberth) | and first can be a bit arbitrary, as Nix has no concept of time :) | 08:49:31 |
flokli | Nix also has no concept of whether a build did fail or not | 08:50:50 |
flokli | You can only guess by checking whether there's a build Log available locally, and the store path or not. Bus as soon as there's a GC in between that doesn't GC the logs you're screwed 💁♂️ | 08:51:53 |
flokli | * You can only guess by checking whether there's a build Log available locally, and the store path or not. But as soon as there's a GC in between that doesn't GC the logs you're screwed 💁♂️ | 08:52:57 |
Picnoir | Right! I found other cases where you don't have drv files: the builtins relying on addToStore, like builtins.toFile
For instance: https://pastebin.aquilenet.fr/?97621c09cc60ef1f#HASi9d2NbdGYa7ARzyP4eVZTAhVDcL7AsooCFFG4rqAk | 08:53:39 |