From 9b886e2acf3065f644ee7261ea83867bab2a5abd Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Tue, 14 Oct 2025 15:31:15 +0200 Subject: [PATCH] libstore: remove unused DerivationGoal::machineName interpolation of the remote store name into activity text is now done in the build hook, so we no longer need to send it back to the daemon. this also reduces the dependency of the daemon on how *exactly* remote builds are done a little bit, and maybe in time we can make these fully opaque. Change-Id: Ie51c4f2cd107350fec4ad0a8ef83621ed86db6a2 --- lix/legacy/build-remote.cc | 1 - lix/libstore/build/derivation-goal.cc | 2 -- lix/libstore/build/derivation-goal.hh | 5 ----- lix/libstore/build/hook-instance.capnp | 7 +++---- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lix/legacy/build-remote.cc b/lix/legacy/build-remote.cc index 989be86d8..9fbd3ae8f 100644 --- a/lix/legacy/build-remote.cc +++ b/lix/legacy/build-remote.cc @@ -449,7 +449,6 @@ kj::Promise Instance::build(BuildContext context) assert(builder); auto ac = context.getResults().initResult().initGood().initAccept(); - RPC_FILL(ac, setMachineName, builder->storeUri); ac.setMachine(kj::heap(store, drvPath, std::move(*builder), buildLogger)); } catch (...) { RPC_FILL(context.getResults(), initResult, std::current_exception()); diff --git a/lix/libstore/build/derivation-goal.cc b/lix/libstore/build/derivation-goal.cc index 773abe2fd..f1be57b3b 100644 --- a/lix/libstore/build/derivation-goal.cc +++ b/lix/libstore/build/derivation-goal.cc @@ -1086,8 +1086,6 @@ try { // the build was accepted by the hook, we can free the slot for another build now hookSlot = {}; - machineName = rpc::to(buildResp.getAccept().getMachineName()); - auto runReq = buildResp.getAccept().getMachine().runRequest(); /* Tell the hook all the inputs that have to be copied to the remote system. */ diff --git a/lix/libstore/build/derivation-goal.hh b/lix/libstore/build/derivation-goal.hh index c4ef8bcc4..97d87659f 100644 --- a/lix/libstore/build/derivation-goal.hh +++ b/lix/libstore/build/derivation-goal.hh @@ -219,11 +219,6 @@ struct DerivationGoal : public Goal std::map builderActivities; - /** - * The remote machine on which we're building. - */ - std::string machineName; - /** Witness type to say that the drvPath has already been added as a temp root */ struct DrvHasRoot { explicit DrvHasRoot() = default; }; diff --git a/lix/libstore/build/hook-instance.capnp b/lix/libstore/build/hook-instance.capnp index 810a068a7..4e8707d73 100644 --- a/lix/libstore/build/hook-instance.capnp +++ b/lix/libstore/build/hook-instance.capnp @@ -24,11 +24,10 @@ interface HookInstance { union { accept :group { machine @0 :AcceptedBuild; - machineName @1 :Data; } - postpone @2 :Void; - decline @3 :Void; - declinePermanently @4 :Void; + postpone @1 :Void; + decline @2 :Void; + declinePermanently @3 :Void; } }