Fix findBuildDependencyInQueue
[?]
May 3, 2013, 2:18 PM
YEXD7CBKPTMRCYQFNJFWXJUFOAKXNCVVYYJW3PHXQ5CX53Y5CUGQCDependencies
- [2]
Y6AHH4THRemove the logfile and logSize columns from the database - [3]
7YBYT2LQ - [4]
DQD7JMSU* Fix the terminology. - [5]
PYTQMQKDHydra/17: in queue runner, prefer builds in the queue that are a dependency of another build (with higher priority) - [6]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [7]
OV7F5M3EMerge branch 'queue-17' - [8]
DTXTS7LN* Speed up findBuildDependencyInQueue by doing only one SQL query for
Change contents
- edit in src/script/hydra-queue-runner at line 51
# Given a build, return an arbitrary queued build on which this build# depends; or undef if no such build exists. - replacement in src/script/hydra-queue-runner at line 55[3.65]→[3.65:163](∅→∅),[3.163]→[3.0:1](∅→∅),[3.1]→[3.2:39](∅→∅),[3.23]→[3.168:200](∅→∅),[3.39]→[3.168:200](∅→∅),[3.168]→[3.168:200](∅→∅),[3.200]→[3.40:205](∅→∅),[3.205]→[2.10771:10907](∅→∅),[3.7033]→[3.345:367](∅→∅),[2.10907]→[3.345:367](∅→∅),[3.345]→[3.345:367](∅→∅)
my $drvpath = $build->drvpath;my @paths = reverse(split '\n', `nix-store -qR $drvpath`);my $depBuild;my @drvs = ();foreach my $path (@paths) {push @drvs, $path if $path =~ /\.drv$/ && $path ne $drvpath;}return unless scalar @drvs > 0;($depBuild) = $db->resultset('Builds')->search({ drvpath => [ @drvs ], finished => 0, busy => 0, enabled => 1, disabled => 0 },{ join => ['project'], rows => 1 } ) ;return $depBuild;my @deps = grep { /\.drv$/ && $_ ne $build->drvpath } computeFSClosure(0, 0, $build->drvpath);return unless scalar @deps > 0;return $db->resultset('Builds')->search({ drvpath => [ @deps ], finished => 0, enabled => 1, disabled => 0 },{ join => ['project'], rows => 1 })->single; - replacement in src/script/hydra-queue-runner at line 111
my $depbuild = findBuildDependencyInQueue($build);$build = $depbuild if defined $depbuild;# Find a dependency of $build that has no queued# dependencies itself. This isn't strictly necessary,# but it ensures that Nix builds are done as part of# their corresponding Hydra builds, rather than as a# dependency of some other Hydra build.while (my $dep = findBuildDependencyInQueue($build)) {$build = $dep;}next if $build->busy;