Skip to content

Commit

Permalink
Correctly handle the non-ca case when building
Browse files Browse the repository at this point in the history
Fix a bug introduced by bb12e9b
  • Loading branch information
thufschmitt committed Apr 22, 2021
1 parent 55a0e33 commit 01019b6
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/hydra-queue-runner/queue-monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -464,18 +464,23 @@ Step::ptr State::createStep(ref<Store> destStore,
auto outputHashes = staticOutputHashes(*localStore, *(step->drv));
bool valid = true;
std::map<DrvOutput, std::optional<StorePath>> missing;
for (auto [outputName, outputHash] : outputHashes) {
if (! destStore->queryRealisation(DrvOutput{outputHash, outputName})) {
valid = false;
missing.insert({{outputHash, outputName}, std::nullopt});
if (settings.isExperimentalFeatureEnabled("ca-derivations")) {
for (auto [outputName, outputHash] : outputHashes) {
if (! destStore->queryRealisation(DrvOutput{outputHash, outputName})) {
valid = false;
missing.insert({{outputHash, outputName}, std::nullopt});
}
}
} else {
for (auto & [outputName, maybeOutputPath] : step->drv->outputsAndOptPaths(*destStore)) {
// If we're not CA, all the output paths should be known
assert(maybeOutputPath.second);
if (!destStore->isValidPath(*maybeOutputPath.second)) {
valid = false;
missing.insert({{outputHashes.at(outputName), outputName}, maybeOutputPath.second});
}
}
}
/* for (auto & [outputName, maybeOutputPath] : destStore->queryPartialDerivationOutputMap(step->drvPath)) { */
/* if (!(maybeOutputPath && destStore->isValidPath(*maybeOutputPath))) { */
/* valid = false; */
/* missing.insert({{outputHashes.at(outputName), outputName}, maybeOutputPath}); */
/* } */
/* } */

/* Try to copy the missing paths from the local store or from
substitutes. */
Expand Down

0 comments on commit 01019b6

Please sign in to comment.