hydra: factored out build restart and
[?]
Dec 3, 2010, 8:40 AM
OSVLMLCQQ52E47CX7TZAIFZSO4VVGRHWJTZY2G23YUPMDCKURTYACDependencies
- [2]
LP3ITP6Rhydra: when restarting a build, remove possible failed dependencies from the failed-cache. - [3]
JI26P3PChydra: export addBuildProducts - [4]
A22P7HCOhydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue. - [5]
N3MB3YSN* added jar to 'contents' list - [6]
A52HEFHQ* Allow builds to be restarted (if they failed with a transient error, - [7]
5SHCWE7X* Prevent repeated evaluation of a jobset with the same inputs. This - [8]
3XTHEUMP* Implemented the clone feature. - [9]
ZILILXXK* Allow scheduled builds to be cancelled. They're not removed from - [10]
O25D52TAinitial support for mercurial - [11]
NLJJZVHO* Use ->update({...}) properly. - [12]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [13]
SGNXIOI4Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only) - [14]
INRF7S4NHydra: Allow all builds to be restarted. - [15]
OOQ2D3KC* Refactoring: move fetchInput out of hydra_scheduler into a separate - [16]
QBQSQOSYhydra: moved getbuildlog - [*]
LBNVQXUB* Build the /build stuff in a separate controller.
Change contents
- replacement in src/lib/Hydra/Controller/Build.pm at line 360[4.353]→[4.353:354](∅→∅),[4.354]→[4.0:42](∅→∅),[4.42]→[2.0:40](∅→∅),[2.40]→[4.103:156](∅→∅),[4.42]→[4.103:156](∅→∅),[4.396]→[4.103:156](∅→∅),[4.156]→[2.41:94](∅→∅),[4.37]→[4.304:305](∅→∅),[2.94]→[4.304:305](∅→∅),[4.304]→[4.304:305](∅→∅),[4.305]→[2.95:199](∅→∅),[2.199]→[4.0:60](∅→∅),[4.305]→[4.0:60](∅→∅),[4.60]→[4.484:521](∅→∅),[4.484]→[4.484:521](∅→∅)
txn_do($c->model('DB')->schema, sub {my $drvpath = $build->drvpath ;error($c, "This build cannot be restarted.")unless $build->finished && -f $drvpath ;my $cmd = "`nix-store -qR $drvpath`";my $r = `nix-store --clear-failed-paths $cmd`;$build->update({finished => 0, timestamp => time});$build->resultInfo->delete;my $drvpath = $build->drvpath ;error($c, "This build cannot be restarted.")unless $build->finished && -f $drvpath ; - replacement in src/lib/Hydra/Controller/Build.pm at line 365
$c->model('DB::BuildSchedulingInfo')->create({ id => $build->id, priority => 0 # don't know the original priority anymore..., busy => 0, locker => ""});});restartBuild($build); - replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 15
our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts);our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts restartBuild); - edit in src/lib/Hydra/Helper/AddBuilds.pm at line 767[4.6996]
sub restartBuild {my ($db, $build) = @_;txn_do($db, sub {my $drvpath = $build->drvpath ;my $outpath = $build->outpath ;my $paths = "";foreach my $bs ($build->buildsteps) {$paths = $paths . " " . $bs->outpath;}my $r = `nix-store --clear-failed-paths $paths $outpath`;$build->update({finished => 0, timestamp => time});$build->resultInfo->delete;$db->resultset('BuildSchedulingInfo')->create({ id => $build->id, priority => 0 # don't know the original priority anymore..., busy => 0, locker => ""});});}