From e039f5f840e6fad10600a794cded31232c134a0a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 18 Jun 2015 04:35:37 +0200 Subject: [PATCH] Create failed build steps for cached failures --- src/hydra-queue-runner/hydra-queue-runner.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 6f13a15f..a45e8bb9 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -1159,12 +1159,16 @@ bool State::doBuildStep(std::shared_ptr store, Step::ptr step, message. */ if (buildStatus != bsAborted) result.errorMsg = ""; - if (!cachedFailure && !retry) { + if (!retry) { - /* Create failed build steps for every build that depends - on this. */ + /* Create failed build steps for every build that + depends on this. For cached failures, only create a + step for builds that don't have this step as + top-level (otherwise the user won't be able to see + what caused the build to fail). */ for (auto build2 : dependents) { if (build == build2) continue; + if (cachedFailure && build2->drvPath == step->drvPath) continue; createBuildStep(txn, 0, build2, step, machine->sshName, buildStepStatus, result.errorMsg, build->id); }