From cceab7308b87b9dfc708ecee469b9ffb865d1c47 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 14 Jun 2013 11:00:05 +0000 Subject: [PATCH] hydra-queue-runner: Handle restarted builds whose derivation is gone Restarted builds whose derivation has been garbage-collected in the meantime caused hydra-queue-runner to get stuck in a loop saying: Jun 14 11:54:25 lucifer hydra-queue-runner[31844]: system type `x86_64-darwin': 0 active, 2 allowed, started 2 builds Jun 14 11:54:25 lucifer hydra-queue-runner[31844]: {UNKNOWN}: path `/nix/store/wcizsch2garjlvs4pswrar47i1hwjaia-inconsolata.drv' is not valid at /nix/store/ypkdm4v13yrk941rvp8h0y425a5ww6nm-hydra-0.1pre1353-40debf1/bin/.hydra-queue-runner-wrapped line 51. at /nix/store/kjpsc2zdaxnd44azxyw60f2px839m1cd-hydra-perl-deps/lib/perl5/site_perl/5.16.2/Catalyst/Model/DBIC/Schema.pm line 501 --- src/script/hydra-queue-runner | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/hydra-queue-runner b/src/script/hydra-queue-runner index 5937656a..9443c8b2 100755 --- a/src/script/hydra-queue-runner +++ b/src/script/hydra-queue-runner @@ -48,6 +48,7 @@ sub unlockDeadBuilds { # depends; or undef if no such build exists. sub findBuildDependencyInQueue { my ($buildsByDrv, $build) = @_; + return undef unless isValidPath($build->drvpath); my @deps = grep { /\.drv$/ && $_ ne $build->drvpath } computeFSClosure(0, 0, $build->drvpath); return unless scalar @deps > 0; foreach my $d (@deps) {