hydra-eval-jobs: Ensure we have output path if ca-derivations is disabled

Brought up by @thufschmitt in
https://github.com/NixOS/hydra/pull/1316#discussion_r1415111329 . This
makes this closer to what was originally there --- which just dispatched
off the experimental feature rather than the presence/absense of the
output, too.
This commit is contained in:
John Ericson 2023-12-05 11:26:26 -05:00
parent e3443cd22a
commit 069b7775c5

View file

@ -243,11 +243,16 @@ static void worker(
}
nlohmann::json out;
for (auto & [outputName, optOutputPath] : outputs)
if (optOutputPath)
for (auto & [outputName, optOutputPath] : outputs) {
if (optOutputPath) {
out[outputName] = state.store->printStorePath(*optOutputPath);
else
} else {
// See the `queryOutputs` call above; we should
// not encounter missing output paths otherwise.
assert(experimentalFeatureSettings.isEnabled(Xp::CaDerivations));
out[outputName] = "";
}
}
job["outputs"] = std::move(out);
reply["job"] = std::move(job);
}