add log diff to compare logs to previous builds
[?]
Sep 26, 2011, 2:47 PM
TH674WKJECNZ4K22DZ2N4SF53UGKG2BQRGBSNESRPDRSRND6TZHACDependencies
- [2]
BIZEPF2Tignore this - [3]
ZEEZRG2Eclean up build page for build that failed with result - [4]
HSVVEKTY* Start of a JSON API to get information about a specific build. - [5]
SHYRGAWZhydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone - [6]
LUPEGYR7Hydra: In case of failure, also show changes between last succesful build and the first failed build after this - [7]
LQNG45RThydra: description at changes section - [8]
TW5ZQX5Z* Move up the build products in the builds page, since they're more - [9]
2B63JW6F* hydra: changes in list in stead of table, also showing changes of changed 'build output' inputs - [10]
XHK7IGYI* hdyra: show last succeeded build and changes since on build status summary if build has failed - [11]
BKOIYITRadded some json responses - [12]
ZI535LI6* hydra: 'new' UI for project/jobset/job/build - [13]
JBUTIGW7hydra: description at changes section - [14]
KJOGCBGZhydra: current build -> this build - [15]
22JB5HNEmake changes section more compact/readable - [*]
SAFVRDTK* Put Hydra's dependencies so that they can easily be installed in a - [*]
QUTWJR7P* Include more info in notification emails. - [*]
CXRCPDSQ* added support for twitter notification - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
MBNX3V52hydra: disallow robots.txt for root and project all builds page
Change contents
- edit in deps.nix at line 23
perlPackages.TextDiffperlPackages.FileSlurp - edit in src/lib/Hydra/Controller/API.pm at line 13
use Text::Diff;use File::Slurp; - replacement in src/lib/Hydra/Controller/API.pm at line 218
$diff .= `(cd $clonePath ; hg log -r $rev1:$rev2)`;$diff .= `(cd $clonePath ; hg log -r $rev1 -r $rev2 -b $branch)`; - edit in src/lib/Hydra/Controller/API.pm at line 230
sub readNormalizedLog {my ($file) = @_;my $res = read_file($file); - edit in src/lib/Hydra/Controller/API.pm at line 235
$res =~ s/\/nix\/store\/[a-z0-9]*-/\/nix\/store\/...-/g;$res =~ s/nix-build-[a-z0-9]*-/nix-build-...-/g;$res =~ s/[0-9]{2}:[0-9]{2}:[0-9]{2}/00:00:00/g;return $res;}sub logdiff : Chained('api') PathPart('logdiff') Args(2) {my ($self, $c, $buildid1, $buildid2) = @_;my $diff = "";my $build1 = getBuild($c, $buildid1);notFound($c, "Build with ID $buildid1 doesn't exist.")if !defined $build1;my $build2 = getBuild($c, $buildid2);notFound($c, "Build with ID $buildid2 doesn't exist.")if !defined $build2;if (-f $build1->resultInfo->logfile && -f $build2->resultInfo->logfile) {my $logtext1 = readNormalizedLog($build1->resultInfo->logfile);my $logtext2 = readNormalizedLog($build2->resultInfo->logfile);$diff = diff \$logtext1, \$logtext2;} else {$c->response->status(404);}$c->stash->{'plain'} = { data => (scalar $diff) || " " };$c->forward('Hydra::View::Plain');} - edit in src/lib/Hydra/Controller/Root.pm at line 154[5.1003][21.37]
, uri_for('API', 'logdiff', [],"*", "*") - edit in src/root/build.tt at line 187
[% IF build.resultInfo.buildstatus != 0 && prevSuccessfulBuild %] - edit in src/root/build.tt at line 188
Changes compared to last successful build:<br/> - replacement in src/root/build.tt at line 192
[% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]<th>First broken build <tt>[% INCLUDE renderDateTime timestamp = firstBrokenBuild.timestamp %]</tt></th>[% END %]<th>This build <tt>[% INCLUDE renderDateTime timestamp = build.timestamp %]</tt></th>[% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]<th>First broken build <tt>[% INCLUDE renderDateTime timestamp = firstBrokenBuild.timestamp %]</tt><br/><tt>[ <a href="[% c.uri_for(c.controller('API').action_for('logdiff') prevSuccessfulBuild.id firstBrokenBuild.id ) %]">log diff</a> ]</tt></th>[% END %]<th>This build <tt>[% INCLUDE renderDateTime timestamp = build.timestamp %]</tt> <br/><tt>[ <a href="[% c.uri_for(c.controller('API').action_for('logdiff') prevSuccessfulBuild.id build.id) %]">log diff</a> ]</tt></th> - edit in src/root/build.tt at line 212
[% END %]