fix: attribute builds to remote store for ssh-ng builds - #232
fix: attribute builds to remote store for ssh-ng builds#232lovesegfault wants to merge 1 commit into
Conversation
maralorn
left a comment
There was a problem hiding this comment.
Hey, thank you for your contribution!
It’s a bit sad to switch from IntMap to a Map, but the Word-commit is probably fine. I will benchmark it just to be sure.
The empty hostname fix does not look correct enough to me, because I fear to many false positives when multiple remote builders and local builds are mixed.
Can we maybe explicitely track when we see a "ssh-ng://" with empty hostname and only apply the fix to those builds instead of all builds on Localhost?
Although I have to say, even then this feels super hacky. What if the source already exists on the remote-builder? Then this detection fails?
|
I fished out "Large activity IDs" into #243 so it can be handled separately. |
|
I've proposed a "real" fix for this upstream, but it's unfortunately a bit hacky there too. In the meantime, I'm going to try improving the fix here a bit. |
When using remote stores via --store "ssh-ng://...", Nix reports Build activities with an empty host field because the remote daemon thinks it is building locally. This uses the parent field from Nix JSON activity messages to scope remote store detection to specific activity trees. When a CopyPath upload to a remote host is observed, the remote store is associated with that activity's parent. When a Build activity reports Localhost as host, the parent chain is walked to find an associated remote store.
|
More upstream work in NixOS/nix#15215 |
Summary
When using
--store "ssh-ng://...", Nix reports builds with empty host field in JSON output. nom was treating these as localhost. Now we detect the remote store from upload activities (which do have correct host info) and use that for builds.Test plan
--store "ssh-ng://..."builds - now correctly attributed to remote host--builders "ssh://..."builds - works as before