build-remote: don't copy failed paths with ssh-ng & --keep-going

checking that the remote build actually succeeded only implied-trusted
remotes or CA derivations makes *absolutely* no sense. we should check
that builds have succeeded before trying to copy them from the remote.

Change-Id: Ib2cf216c580f4c577dd9fef8849acc033ae082b9
This commit is contained in:
eldritch horrors
2025-07-24 17:56:05 +02:00
parent f6c0aea824
commit e88a85bd92
+9 -8
View File
@@ -496,14 +496,6 @@ kj::Promise<void> AcceptedBuild::run(RunContext context)
}
optResult =
TRY_AWAIT(sshStore->buildDerivation(drvPath, (const BasicDerivation &) drv));
auto & result = *optResult;
if (!result.success())
throw Error(
"build of '%s' on '%s' failed: %s",
store->printStorePath(drvPath),
storeUri,
result.errorMsg
);
} else {
TRY_AWAIT(copyClosure(
*store, *sshStore, StorePathSet{drvPath}, NoRepair, NoCheckSigs, substitute
@@ -517,6 +509,15 @@ kj::Promise<void> AcceptedBuild::run(RunContext context)
optResult = std::move(res[0]);
}
auto & result = *optResult;
if (!result.success()) {
throw Error(
"build of '%s' on '%s' failed: %s",
store->printStorePath(drvPath),
storeUri,
result.errorMsg
);
}
StorePathSet missingPaths;
auto outputPaths = drv.outputsAndPaths(*store);