Remove dead code
[?]
Nov 19, 2014, 1:59 PM
ARATXDQ4AEEKSQGGOX5TTTVONAWNGNVO7VTKA3JFCBQVQ5AN2TTQCDependencies
- [2]
G647DZSGgetPrimaryBuildsForView: Return all view results - [3]
ZB3JV52WAdd a "My jobsets" tab to the dashboard - [4]
RBGYFVWXuse HYDRA_DATA/hydra.conf as default location for hydra.conf - [5]
P5X4P6VK* Renaming "release sets" to "views" (not finished yet). Having - [6]
ID5DHUFU* Cleanup. - [7]
KPZNJ33U* In views, support selecting a job that doesn't depend on the - [8]
NI5BVF2V* In job inputs of type "build", allow the project and jobset names of - [9]
F5RYSE7Tqualify order by column - [10]
AFTXA575* $HYDRA_DATA environment variable. - [11]
JLDUSNUO* Unify rendering of finished and scheduled builds. - [12]
2T42QGZD* Register builds as GC roots so they don't get deleted. - [13]
NP6QUCL7* Fix indentation. - [14]
E5DMQRPORemove unnecessary whitespace in the HTML output - [15]
IE3SRMWZ* Show global and per-project statistics. - [16]
T2232OBS* Add some DB indices to make the /releases page much faster. - [17]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [18]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [19]
HPEG2RHVMerge the BuildResultInfo table into the Builds table - [20]
PMNWRTGJAdd multiple output support - [21]
XBU2ODSP* More renaming. - [22]
PY4WQF5Gremove ascii escapes from log in tail page and emails - [23]
H7CNGK4O* Log evaluation errors etc. in the DB. - [24]
6KIJX24RGet rid of unnecessary [%- and -%] tags - [25]
4WZQW2N6Fix indentation and get rid of some unnecessary whitespace in the output - [26]
KU33KNG3Add a redirect to the evaluation page of a view result - [27]
JAH3UPWASupport revision control systems via plugins - [28]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [29]
WQXF2T3Dhydra-evaluator: Don't require $HYDRA_CONFIG - [30]
O776XDS2Make getDrvLogPath work with both bucketed and non-bucketed nix logs. - [31]
PPJN6SDP* paging for releases page - [32]
ZCTGG25SAdd a redirect to the latest view result for which the underlying evaluation has finished completely - [33]
BDSD2JLV* Speed up manifest generation. - [34]
K22TMPH5Make the info tables less compressed - [35]
ZH6B56XRTry harder to find build logs - [36]
Y6AHH4THRemove the logfile and logSize columns from the database - [37]
2BUX775I* More release -> view. - [38]
A63IHCMX* Register GC roots properly. - [39]
OX6NYJDVSplit viewing and editing a jobset - [40]
IN272KZW* Automatically keep all builds in the latest successful release in - [41]
2GK5DOU7* Downloading closures. - [42]
JFZNAYJX* Showing releases. - [43]
FU3ZFU2Q* me.id -> build.id. - [44]
VPEQI5QS* Don't disable fsync in production. - [45]
TJK27WSBOpen the DB using Hydra::Model::DB->new - [46]
5EIPRLDDexport logContents - [47]
CQTN62OHDie tabs die - [48]
AMFMXR52Provide a command ‘hydra-init’ to initialise/upgrade the database - [49]
R6B5CAFFLet Builds.timestamp refer to the time the build was added - [50]
T7Z63K6Thydra: moves jobsetOverview sub - [*]
HTL6HIBMmachine-status: Read /etc/nix.machines instead of using the BuildMachines table - [*]
IK53RV4V
Change contents
- edit in src/lib/Hydra/Helper/Nix.pm at line 18[4.706]→[4.0:28](∅→∅),[4.28]→[4.629:654](∅→∅),[4.323]→[4.629:654](∅→∅),[4.629]→[4.629:654](∅→∅),[4.654]→[4.0:48](∅→∅)
getPrimaryBuildsForViewgetPrimaryBuildTotalgetViewResult getLatestSuccessfulViewResult - edit in src/lib/Hydra/Helper/Nix.pm at line 104[4.1403]→[4.1403:1406](∅→∅),[4.1406]→[4.700:723](∅→∅),[4.723]→[4.459:660](∅→∅),[4.660]→[4.1327:1359](∅→∅),[4.1359]→[4.847:920](∅→∅),[4.5226]→[4.847:920](∅→∅),[4.847]→[4.847:920](∅→∅),[4.920]→[4.138:168](∅→∅),[4.168]→[4.1185:1187](∅→∅),[4.951]→[4.1185:1187](∅→∅),[4.1185]→[4.1185:1187](∅→∅),[4.1187]→[4.952:953](∅→∅),[4.953]→[4.1406:1407](∅→∅),[4.1187]→[4.1406:1407](∅→∅),[4.1406]→[4.1406:1407](∅→∅),[4.1407]→[4.1188:1215](∅→∅),[4.1215]→[4.1443:1480](∅→∅),[4.1443]→[4.1443:1480](∅→∅),[4.1480]→[4.954:1014](∅→∅)
}sub allPrimaryBuilds {my ($project, $primaryJob) = @_;my $allPrimaryBuilds = $project->builds->search({ jobset => $primaryJob->get_column('jobset'), job => $primaryJob->get_column('job'), finished => 1 },{ order_by => "id DESC", where => \ attrsToSQL($primaryJob->attrs, "me.id")});return $allPrimaryBuilds;}sub getPrimaryBuildTotal {my ($project, $primaryJob) = @_;return scalar(allPrimaryBuilds($project, $primaryJob)); - edit in src/lib/Hydra/Helper/Nix.pm at line 107[4.1016]→[4.1016:1046](∅→∅),[4.1046]→[4.1316:1377](∅→∅),[4.1316]→[4.1316:1377](∅→∅),[4.1511]→[4.1511:1512](∅→∅),[4.1512]→[2.0:161](∅→∅),[2.161]→[4.1648:1649](∅→∅),[4.1797]→[4.1648:1649](∅→∅),[4.1649]→[4.1797:1827](∅→∅),[4.1797]→[4.1797:1827](∅→∅),[4.1827]→[4.1047:1048](∅→∅),[4.1048]→[4.1650:1677](∅→∅),[4.1827]→[4.1650:1677](∅→∅),[4.1677]→[4.57:94](∅→∅),[4.94]→[4.1706:1725](∅→∅),[4.1706]→[4.1706:1725](∅→∅),[4.1725]→[4.95:599](∅→∅),[4.599]→[4.5227:5251](∅→∅),[4.5251]→[4.0:39](∅→∅),[4.645]→[4.0:39](∅→∅),[4.39]→[4.678:739](∅→∅),[4.205]→[4.678:739](∅→∅),[4.678]→[4.678:739](∅→∅),[4.819]→[4.819:841](∅→∅),[4.841]→[4.1827:1828](∅→∅),[4.1725]→[4.1827:1828](∅→∅),[4.1827]→[4.1827:1828](∅→∅),[4.1828]→[4.842:1140](∅→∅),[4.1140]→[4.206:262](∅→∅),[4.262]→[4.144:155](∅→∅),[4.144]→[4.144:155](∅→∅),[4.155]→[4.5252:5272](∅→∅),[4.5272]→[4.1360:1404](∅→∅),[4.1404]→[4.248:305](∅→∅),[4.248]→[4.248:305](∅→∅),[4.381]→[4.1141:1187](∅→∅),[4.1187]→[4.263:264](∅→∅),[4.264]→[4.2899:2925](∅→∅),[4.2899]→[4.2899:2925](∅→∅),[4.2925]→[4.5273:5274](∅→∅)
sub getPrimaryBuildsForView {my ($project, $primaryJob, $page, $resultsPerPage) = @_;my @primaryBuilds = allPrimaryBuilds($project, $primaryJob)->search({}, defined $resultsPerPage ? { rows => $resultsPerPage, page => $page } : {});return @primaryBuilds;}sub findLastJobForBuilds {my ($ev, $depBuilds, $job) = @_;my $thisBuild;my $project = $job->get_column('project');my $jobset = $job->get_column('jobset');# If the job is in the same jobset as the primary build, then# search for a build of the job among the members of the jobset# evaluation ($ev) that produced the primary build.if (defined $ev && $project eq $ev->get_column('project')&& $jobset eq $ev->get_column('jobset')){$thisBuild = $ev->builds->find({ job => $job->get_column('job'), finished => 1 },{ rows => 1, order_by => ["build.id"], where => \ attrsToSQL($job->attrs, "build.id")});}# As backwards compatibility, find a build of this job that had# the primary build as input. If there are multiple, prefer# successful ones, and then oldest. !!! order_by buildstatus is# hacky$thisBuild = $depBuilds->find({ project => $project, jobset => $jobset, job => $job->get_column('job'), finished => 1},{ rows => 1, order_by => ["buildstatus", "id"], where => \ attrsToSQL($job->attrs, "build.id")})unless defined $thisBuild;return $thisBuild;} - edit in src/lib/Hydra/Helper/Nix.pm at line 126[3.842]→[4.1004:1006](∅→∅),[4.883]→[4.1004:1006](∅→∅),[4.4003]→[4.1004:1006](∅→∅),[4.1004]→[4.1004:1006](∅→∅),[4.1006]→[4.5597:5598](∅→∅),[4.1006]→[4.1051:1072](∅→∅),[4.5598]→[4.1051:1072](∅→∅),[4.2925]→[4.1051:1072](∅→∅),[4.1072]→[2.162:209](∅→∅),[2.209]→[4.365:366](∅→∅),[4.1881]→[4.365:366](∅→∅),[4.366]→[4.1886:1936](∅→∅),[4.1886]→[4.1886:1936](∅→∅),[4.1936]→[4.1188:1581](∅→∅),[4.1581]→[2.210:354](∅→∅),[2.354]→[4.367:368](∅→∅),[4.1581]→[4.367:368](∅→∅),[4.368]→[4.1073:1144](∅→∅),[4.1586]→[4.1073:1144](∅→∅),[4.1936]→[4.1073:1144](∅→∅),[4.1144]→[4.2003:2053](∅→∅),[4.2003]→[4.2003:2053](∅→∅),[4.2053]→[4.369:370](∅→∅),[4.370]→[4.2062:2095](∅→∅),[4.2062]→[4.2062:2095](∅→∅),[4.2095]→[4.394:462](∅→∅),[4.462]→[4.1587:1673](∅→∅),[4.543]→[4.2740:2741](∅→∅),[4.1673]→[4.2740:2741](∅→∅),[4.2740]→[4.2740:2741](∅→∅),[4.2741]→[4.6152:6342](∅→∅),[4.6342]→[4.2993:3385](∅→∅),[4.2993]→[4.2993:3385](∅→∅),[4.3385]→[4.394:416](∅→∅),[4.416]→[4.3385:3396](∅→∅),[4.3385]→[4.3385:3396](∅→∅),[4.3396]→[4.846:848](∅→∅),[4.846]→[4.846:848](∅→∅),[4.848]→[4.680:681](∅→∅),[4.680]→[4.680:681](∅→∅),[4.681]→[4.3397:3398](∅→∅),[4.3398]→[4.1145:1181](∅→∅),[4.1181]→[4.658:713](∅→∅),[4.713]→[4.3475:3491](∅→∅),[4.3475]→[4.3475:3491](∅→∅),[4.3491]→[4.1182:1255](∅→∅),[4.1255]→[2.355:454](∅→∅),[2.454]→[4.765:805](∅→∅),[4.765]→[4.765:805](∅→∅),[4.972]→[4.972:995](∅→∅),[4.995]→[4.3637:3643](∅→∅),[4.1325]→[4.3637:3643](∅→∅),[4.3637]→[4.3637:3643](∅→∅),[4.3643]→[4.912:930](∅→∅)
}sub getViewResult {my ($primaryBuild, $jobs, $finished) = @_;my @jobs = ();my $status = 0; # = okay# Get the jobset evaluation of which the primary build is a# member. If there are multiple, pick the oldest one (i.e. the# lowest id). (Note that for old builds in the database there# might not be a evaluation record, so $ev may be undefined.)my $ev = $primaryBuild->jobsetevalmembers->find({}, { rows => 1, order_by => "eval" });$ev = $ev->eval if defined $ev;if ($finished) {return undef unless defined $ev;return undef if $ev->builds->search({ finished => 0 })->count > 0;}# The timestamp of the view result is the highest timestamp of all# constitutent builds.my $timestamp = 0;foreach my $job (@{$jobs}) {my $thisBuild = $job->isprimary? $primaryBuild: findLastJobForBuilds($ev, scalar $primaryBuild->dependentBuilds, $job);if (!defined $thisBuild) {$status = 2 if $status == 0; # = unfinished} elsif ($thisBuild->get_column('buildstatus') != 0) {$status = 1; # = failed}$timestamp = $thisBuild->timestampif defined $thisBuild && $thisBuild->timestamp > $timestamp;push @jobs, { build => $thisBuild, job => $job };}return{ id => $primaryBuild->id, releasename => $primaryBuild->get_column('releasename'), jobs => [@jobs], status => $status, timestamp => $timestamp, eval => $ev};}sub getLatestSuccessfulViewResult {my ($project, $primaryJob, $jobs, $finished) = @_;my $latest;foreach my $build (getPrimaryBuildsForView($project, $primaryJob)) {my $result = getViewResult($build, $jobs, $finished);next unless defined $result;next if $result->{status} != 0;return $build;}return undef; - edit in src/lib/Hydra/Helper/Nix.pm at line 286
- edit in src/root/common.tt at line 130[4.2829]→[4.3456:3593](∅→∅),[4.2829]→[4.1508:1509](∅→∅),[4.3593]→[4.1508:1509](∅→∅),[4.2201]→[4.1508:1509](∅→∅),[4.3124]→[4.6947:6948](∅→∅),[4.6947]→[4.6947:6948](∅→∅)
BLOCK renderViewJobName;IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END;END;