-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move build loop into the client #5056
Comments
I hope this be done in a way to improve remote builders more generally? e.g. one can already do Per #5025 (comment) it sounds like you had similar thoughts. I hope we can do just that! |
Also, I hope this doesn't need to be mandatory? E.g. if I am using a big build farm, I do want the build farms to do the scheduling. I think being able to open "reverse" connections would help such that the remote store can use the client as a build remote for those fixed-output derivations / remote store for anything the client has already built. |
@edolstra Can you clarify why "since the daemon doesn't have access to the eval store used by the client" is a problem? After evaluation, the client will copy all Like @Ericson2314 I hope this would be an optional thing. For https://nixbuild.net, it is beneficial to just receive a big pile of The idea about being able to open a reverse connection to the client, and use the client as an additional substituter sounds like a great way of solving the problem of fetching fixed outputs that needs SSH keys etc. |
@rickynils Incidentally, I think the "reverse connection" use-case is the best concrete reason to switch to an off-the-shelf RPC protocol. You really want to multiplex streams to avoid bad liveness issues of traffic for requests in one way blocking the other, and stuff gets complex quick. |
@Ericson2314 Yeah, I agree. Any ideas on how we can get started? :) |
More progress on issue NixOS#5729 The method trivially generalizes to be store-implementation-agnostic, in fact. However, we force it to continue to be unimplemented with `RemoteStore` and `LegacySSHStore` because the implementation we'd get via the generalization is probably not the one users expect. This keeps our hands untied to do it right going forward. For more about the tension between the scheduler logic being store-type-agnostic and remote stores doing their own scheduling, see issues NixOS#5025 and NixOS#5056.
More progress on issue NixOS#5729 The method trivially generalizes to be store-implementation-agnostic, in fact. However, we force it to continue to be unimplemented with `RemoteStore` and `LegacySSHStore` because the implementation we'd get via the generalization is probably not the one users expect. This keeps our hands untied to do it right going forward. For more about the tension between the scheduler logic being store-type-agnostic and remote stores doing their own scheduling, see issues NixOS#5025 and NixOS#5056.
Currently, when using the Nix daemon, the whole dependency graph machinery (i.e.
Worker
,DerivationGoal etc.) is done in the daemon. However, this doesn't work well with
--eval-store(#5025) since the daemon doesn't have access to the eval store used by the client. It also doesn't allow fixed-output derivations to be run in the context of the client (where it has access to stuff like SSH keys for
fetchGit`).So we should move the build logic into the client.
Worker
already has been generalized to work on anyStore
, so the main remaining change is to haveDerivationGoal
andSubstitutionGoal
call the daemon to do the actual build/substitution.The text was updated successfully, but these errors were encountered: