* In the scheduler, don't check if we've already done a build (except
[?]
Oct 7, 2009, 1:18 PM
CVDK3XJKQJVLCNJM5E5K2T7ZIIIBN3WLEK3ADBGQEPAOJ6FZTPNQCDependencies
- [2]
S6OISBQ3* Mark the "current" builds in a jobset, i.e. those corresponding to - [3]
H7CNGK4O* Log evaluation errors etc. in the DB. - [4]
7YBYT2LQ - [5]
L2E6EVE2* Merged the Build and Job tables. - [6]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [7]
S5PV6IIM* Represent jobs explicitly in the DB. - [8]
XNCWZ7OT* Get the job priority from the meta.schedulingPriority attribute. - [*]
UUGBVEGY* Development notes. - [*]
AHTEIK7G* Added a maintainers field to the Builds table. - [*]
N22GPKYT* Put info about logs / build products in the DB.
Change contents
- edit in doc/dev-notes.txt at line 92
alter table builds add column isCurrent integer default 0; - replacement in src/script/hydra_scheduler.pl at line 276
# Have we already done this build (in this job)? Don't do it# again unless it has been garbage-collected. The latest# builds for each platforms are GC roots, so they shouldn't be# GCed. However, if a job has reverted to a previous state,# it's possible that a GCed build becomes current again. In# that case we have to rebuild it to ensure that it appears in# channels etc.my @previousBuilds = $jobInDB->builds->search({outPath => $outPath}, {order_by => "id"});# Don't add a build that has already been scheduled for this# job, or has been built but is still a "current" build for# this job. Note that this means that if the sources of a job# are changed from A to B and then reverted to A, three builds# will be performed (though the last one will probably use the# cached result from the first). This ensures that the builds# with the highest ID will always be the ones that we want in# the channels.# !!! Checking $drvPath doesn't take meta-attributes into# account. For instance, do we want a new build to be# scheduled if the meta.maintainers field is changed?my @previousBuilds = $jobInDB->builds->search({drvPath => $drvPath, isCurrent => 1}); - replacement in src/script/hydra_scheduler.pl at line 289
foreach my $build (@previousBuilds) {if (!$build->finished) {print "already scheduled as build ", $build->id, "\n";$currentBuilds->{$build->id} = 1;return;}}if (isValidPath($outPath)) {print "already done as build ", $previousBuilds[0]->id, "\n";# Mark the previous build as "current" so that it will# appear in the "latest" channel for this# project/jobset/job.$previousBuilds[0]->update({iscurrent => 1});$currentBuilds->{$previousBuilds[0]->id} = 1;return;}print "already done as build ", $previousBuilds[0]->id,"; rebuilding because it was garbage-collected\n";print "already scheduled/built\n";$currentBuilds->{$_->id} = 1 foreach @previousBuilds;return; - replacement in src/script/hydra_scheduler.pl at line 293
- edit in src/script/hydra_scheduler.pl at line 452
print "current is ", $build->id, "\n";