* Allow users to change the value of a build's "keep" flag, which
[?]
Mar 14, 2009, 11:56 PM
NEWDDAOFCDLYBXQCZNQ2GDH7HPAHVN3YRDL52ZYEMVA4YH6LBDXACDependencies
- [2]
3E6IP3R3* Add the name of the jobset to ReleaseSetJobs, otherwise we can't - [3]
WZ3AEJ67* hydra_update_gc_roots.pl registers build outputs that should be kept - [4]
IN272KZW* Automatically keep all builds in the latest successful release in - [5]
4X6NS66Q* Keep the most recent builds for each job. - [6]
2T42QGZD* Register builds as GC roots so they don't get deleted. - [7]
A52HEFHQ* Allow builds to be restarted (if they failed with a transient error, - [8]
ZILILXXK* Allow scheduled builds to be cancelled. They're not removed from - [9]
BD3GRK4B* Get rid of "positive failures" and separate log phases. - [*]
LBNVQXUB* Build the /build stuff in a separate controller. - [*]
J5UVLXOK* Start of a basic Catalyst web interface.
Change contents
- replacement in src/lib/Hydra/Controller/Build.pm at line 217
$build->finished(1);$build->timestamp(time());$build->update;$build->update({finished => 1, timestamp => time}); - edit in src/lib/Hydra/Controller/Build.pm at line 229
$c->res->redirect($c->uri_for($self->action_for("view_build"), $c->req->captures));}sub keep : Chained('build') PathPart Args(1) {my ($self, $c, $newStatus) = @_;my $build = $c->stash->{build};requireProjectOwner($c, $build->project);die unless $newStatus == 0 || $newStatus == 1;$c->model('DB')->schema->txn_do(sub {$build->resultInfo->update({keep => int $newStatus});});$c->flash->{buildMsg} =$newStatus == 0 ? "Build will not be kept." : "Build will be kept."; - replacement in src/root/build.tt at line 60
[% IF build.resultInfo.buildstatus == 3 || build.resultInfo.buildstatus == 4 %][% IF c.user_exists && (build.resultInfo.buildstatus == 3 || build.resultInfo.buildstatus == 4) %] - edit in src/root/build.tt at line 175
</tr>[% END %][% IF build.finished && build.buildproducts %]<tr><th>Availability:</th><td>[% IF !available %]<em>Build output is no longer available</em>[% ELSIF build.resultInfo.keep %]<em>Build output will be kept permanently</em>[% IF c.user_exists %]<form action="[% c.uri_for('/build' build.id 'keep' 0) %]" method="post" class="inline"><button id="unkeep" type="submit">Unkeep</button></form>[% END %][% ELSE %]<em>Build output is available, but may be garbage-collected</em>[% IF c.user_exists %]<form action="[% c.uri_for('/build' build.id 'keep' 1) %]" method="post" class="inline"><button id="keep" type="submit">Keep</button></form>[% END %][% END %]</td> - replacement in src/script/hydra_update_gc_roots.pl at line 24
print "keeping build ", $build->id, " (",print STDERR "keeping build ", $build->id, " (", - replacement in src/script/hydra_update_gc_roots.pl at line 40[3.577]→[3.577:627](∅→∅),[3.627]→[2.5567:5626](∅→∅),[2.5626]→[3.696:702](∅→∅),[3.696]→[3.696:702](∅→∅),[3.702]→[2.5627:5721](∅→∅)
foreach my $job ($project->builds->search({},{select => [{distinct => 'job'}], as => ['job']})){print "*** looking for builds to keep in job ", $project->name, ":", $job->job, "\n";foreach my $job ($project->jobs->all) {print STDERR "*** looking for builds to keep in job ",$project->name, ":", $job->jobset->name, ":", $job->name, "\n"; - replacement in src/script/hydra_update_gc_roots.pl at line 46[3.886]→[3.886:939](∅→∅),[3.939]→[2.5722:5753](∅→∅),[2.5753]→[3.980:1008](∅→∅),[3.980]→[3.980:1008](∅→∅)
my @recentBuilds = $project->builds->search({ job => $job->job, finished => 1# !!! Take time into account? E.g. don't delete builds that# are younger than N days.my @recentBuilds = $job->builds->search({ finished => 1 - edit in src/script/hydra_update_gc_roots.pl at line 58
- replacement in src/script/hydra_update_gc_roots.pl at line 63
print "*** looking for builds to keep in release set ", $project->name, ":", $releaseSet->name, "\n";print STDERR "*** looking for builds to keep in release set ", $project->name, ":", $releaseSet->name, "\n"; - replacement in src/script/hydra_update_gc_roots.pl at line 71
print "keeping latest successful release ", $latest->id, " (", $latest->get_column('releasename'), ")\n";print STDERR "keeping latest successful release ", $latest->id, " (", $latest->get_column('releasename'), ")\n"; - replacement in src/script/hydra_update_gc_roots.pl at line 81
print "*** looking for kept builds\n";print STDERR "*** looking for kept builds\n"; - replacement in src/script/hydra_update_gc_roots.pl at line 87
print "*** looking for scheduled builds\n";print STDERR "*** looking for scheduled builds\n"; - replacement in src/script/hydra_update_gc_roots.pl at line 90
print "keeping scheduled build ", $build->id, " (",print STDERR "keeping scheduled build ", $build->id, " (", - replacement in src/script/hydra_update_gc_roots.pl at line 101
print "*** removing unneeded GC roots\n";print STDERR "*** removing unneeded GC roots\n";