hydra-update-gc-roots: Keep more evals
[?]
Sep 18, 2013, 11:10 AM
ACFFJUAN5R2AFJVVJ5OBX6BQHT3M4SHO7QXILF5LURVIFPDORLIQCDependencies
- [2]
MUBBWJPAKeep builds that failed with output - [3]
AEFNBIIW* Merge the GC branch. - [4]
I3X25POIhydra-update-gc-roots: Keep the most recent evaluations - [5]
2T42QGZD* Register builds as GC roots so they don't get deleted. - [6]
A63IHCMX* Register GC roots properly. - [7]
WZ3AEJ67* hydra_update_gc_roots.pl registers build outputs that should be kept - [8]
ONAQU4BRhydra: handle case where build to keep set to 0 - [9]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [10]
KJQWSRCCSpeed up hydra-update-gc-roots - [11]
NEWDDAOF* Allow users to change the value of a build's "keep" flag, which - [12]
SZPBGW2NFix a race condition in hydra-update-gc-roots - [13]
6KJXJB7Nqualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite - [14]
TJK27WSBOpen the DB using Hydra::Model::DB->new - [15]
E2X5OTFSKeep builds of disabled jobsets that are not hidden. Fixes #18. - [16]
4X6NS66Q* Keep the most recent builds for each job. - [17]
PMNWRTGJAdd multiple output support - [18]
HPEG2RHVMerge the BuildResultInfo table into the Builds table
Change contents
- edit in src/script/hydra-update-gc-roots at line 59
# For scheduled builds, we register the derivation as a GC root.print STDERR "*** looking for scheduled builds\n";keepBuild $_ foreach $db->resultset('Builds')->search({ finished => 0 }, { columns => [ @columns ] }); - edit in src/script/hydra-update-gc-roots at line 89
next;}if ($keepnr <= 0 ) {print STDERR "*** jobset ", $project->name, ":", $jobset->name, " set to keep 0 builds\n"; - replacement in src/script/hydra-update-gc-roots at line 92
print STDERR "*** looking for all builds in the $keepnr most recent evaluations of jobset ",print STDERR "*** looking for all builds in the unfinished and $keepnr most recent finished evaluations of jobset ", - edit in src/script/hydra-update-gc-roots at line 94
my @evals;# Get the unfinished evals.push @evals, $_->get_column("eval") foreach $jobset->builds->search({ finished => 0 },{ join => "jobsetevalmembers", select => "jobsetevalmembers.eval", as => "eval", distinct => 1 });# Get the N most recent finished evals.if ($keepnr) {push @evals, $_->get_column("id") foreach $jobset->jobsetevals->search({ hasNewBuilds => 1 },{ where => \ "not exists (select 1 from builds b join jobsetevalmembers m on b.id = m.build where m.eval = me.id and b.finished = 0)", order_by => "id desc", rows => $keepnr });} - replacement in src/script/hydra-update-gc-roots at line 112
, id => { -in =>\ [ "select build from JobsetEvalMembers where eval in (select id from JobsetEvals where project = ? and jobset = ? and hasNewBuilds = 1 order by id desc limit ?)",[ '', $project->name ], [ '', $jobset->name ], [ '', $keepnr ] ] }, id => { -in => $db->resultset('JobsetEvalMembers')->search({ eval => { -in => [@evals] } }, { select => "build" })->as_query } - edit in src/script/hydra-update-gc-roots at line 135[3.1500]→[3.1304:1369](∅→∅),[3.1369]→[3.2315:2366](∅→∅),[3.769]→[3.2315:2366](∅→∅),[3.2366]→[3.2620:2723](∅→∅),[3.2723]→[3.1968:1970](∅→∅),[3.1968]→[3.1968:1970](∅→∅)
# For scheduled builds, we register the derivation as a GC root.print STDERR "*** looking for scheduled builds\n";keepBuild $_ foreach $db->resultset('Builds')->search({ finished => 0 }, { columns => [ @columns ] });