hydra-server: Support logs in S3

[?]
Apr 5, 2017, 3:55 PM
EYAA7MJYQFEYESCXEHXOZ7QXIFFLYQYB5C6PIKHKBWS734KEFO2QC

Dependencies

  • [2] 4KHO6UPQ change regexp for ascii escapes in log
  • [3] JFGNTEAB plain-reload: Scroll down at document load.
  • [4] XO72X6PQ Handle SSH hosts without a @
  • [5] NX5BM2OI Machine status page: Show disabled machines and some machine stats
  • [6] CHKVSGZG build.tt: Fix reference to build.ischannel.
  • [7] ABVOFHCV Construct uri using uri_for, which respects X-Request-Base.
  • [8] O5ZANJMR Make "Running builds" and "Machine status" pages faster
  • [9] UKFZFDJO Remove the pretty-printed log
  • [10] VG4QG336 Remove tablesorter
  • [11] TPNHTE5V Remove obsolete Builds columns and provide accurate "Running builds"
  • [12] ZIQRKUMJ Escape the log tail to ensure we produce correct HTML
  • [13] UICHT2PS Add a search feature
  • [14] KLSDJV75 Serve raw uncompressed logs directly
  • [15] RSEGBU6C Hydra/20: Jobset clone feature
  • [16] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [17] HN3V252L On the build page, show how many aggregate constituents failed
  • [18] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [19] WNQRX7QB Doh
  • [20] WRIU3S5E * UI for cloning builds (not functional yet).
  • [21] 3PJ77S7Q Set utf-8 charset for raw logs
  • [22] T5BIOVJE Add support for tracking custom metrics
  • [23] CLJQCY2X * Store info about all the build actions and allow them to be
  • [24] WXV6M6XN Add a convenient way to get logs of a path/drv. Requested by phreedom.
  • [25] PPAE3Z3D plain-reload: Constrain tail output to 50 lines.
  • [26] PMNWRTGJ Add multiple output support
  • [27] 5EIPRLDD export logContents
  • [28] TQVKZQUG Use the REST API in the web interface for editing jobsets
  • [29] TX7Q4RAS Add page showing latest build steps
  • [30] BIVZGPUT Optimise clickable rows
  • [31] 3QWDDLBR Add support for logging in via a Google account
  • [32] 2BUX775I * More release -> view.
  • [33] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [34] D7X6XTKQ Integrate the "Job status" and "All jobs" tabs
  • [35] JOVVHIJX Remove all entry points to modify machines
  • [36] HZWUT4YN Allow users to reproduce builds on their own systems
  • [37] MSIHMO45 Tweak build steps
  • [38] 3EJABTVV Show build products on aggregates with channels.
  • [39] CQTN62OH Die tabs die
  • [40] OX6NYJDV Split viewing and editing a jobset
  • [41] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [42] C2DCO6AS
  • [43] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [44] 64IV56HI Replace bootstrap tarball
  • [45] FQAZTEK6 Don't set Expires header for logs of unfinished builds/steps
  • [46] FV2M6MOT hydra: use autoconf/-make
  • [47] QCGCX2BR Generalize lazy tabs
  • [48] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [49] LBNVQXUB * Build the /build stuff in a separate controller.
  • [50] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [51] 4WZQW2N6 Fix indentation and get rid of some unnecessary whitespace in the output
  • [52] W3XAFDK6 Remove obsolete/broken timeline feature
  • [53] MMDLWWZ2 automatic reload of tail log when build is running
  • [54] RX7USXWQ jobset: Add a new "channels" tab.
  • [55] QAUDQPWG Add a more concise queue page
  • [56] SMTMFEKE hydra: add missing templates
  • [57] AFTXA575 * $HYDRA_DATA environment variable.
  • [58] JY7BXXOP Split viewing and editing a project
  • [59] 3TZYSSGX built.tt: Handle the case where the original build is not known
  • [60] DAPOSS44 Use the REST API in the web interface for editing projects
  • [61] M6WGSGNM Don't show duration of unfinished builds
  • [62] 3PNG7NIB Remove trailing whitespace
  • [63] V6S6OYIA Formatting tweaks
  • [64] OTNJLJHA Sort build steps
  • [65] YU6CND7C Remove support for views
  • [66] AK2UZDS2 Jobset page: Add a new tab to show job status in a matrix
  • [67] NEQ4BISO Add bootstrap.zip
  • [68] 6M4KNDXX * Catalyst::View::Download::Plain doesn't like empty files.
  • [69] D5QIOJGP * Move everything up one directory.
  • [70] 2GK5DOU7 * Downloading closures.
  • [71] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [72] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [73] RBHHV7P7 * Read logs using logContents function in stead of handling it everywhere separately.
  • [74] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [75] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [76] U6UJRDG2 * Oops.
  • [77] TUMFOKWN Fix "Use of uninitialized value $mode"
  • [78] U2X3Y53G make sure status images always display for a list of builds
  • [79] RGRBQI2F show all related jobset/job links in navbar for the tail/-reload logs
  • [80] U72VNKRU Remove unused file
  • [81] GAIBDEZZ * Store the name of the machine that performed a build step in the
  • [82] OR5SJ42Y Show releases in a tab on the project page
  • [83] GS4BE6TB Asynchronously compress build logs
  • [84] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [85] UMEKGOSY Update flot to 0.8.3
  • [86] 5DSDXORD hydra: missing plain.tt
  • [87] YPDYBK5G Show dependencies as a tree rather than a list
  • [88] F5RYSE7T qualify order by column
  • [89] Q24QXGSM * Don't do pretty printing for large logs, because the XSLT processing
  • [90] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [91] A63IHCMX * Register GC roots properly.
  • [92] QWVUIGFY add link to build on tail/-reload log pages
  • [93] 3JBUMW3E forgot to commit a file
  • [94] 2GUAKGTB Fix indentation of build.tt
  • [95] 6JGCGK5X
  • [96] 36M6DGIT Show the runtime/build dependencies in the build page
  • [97] X6RB5HQ6 Put a 5-second CPU time limit on the log processing pipeline.
  • [98] IN272KZW * Automatically keep all builds in the latest successful release in
  • [99] U4TD3AIQ Add support for viewing jobset evaluations
  • [100] CNEQ7L4G Don't show logs bigger than 64 MB
  • [101] G2WXEQHE Remove the Errors page
  • [102] WDKFN4B2 Make sign in a modal dialog box rather than a separate page
  • [103] VBWHG272 Re-add the history tab (store size and build time), now as lazy-loaded tab on build page.
  • [104] SAIUFDP3 hydra: make sure viewing logs works when logs are bz2'd
  • [105] LSZLZHJY Allow users to edit their own settings
  • [106] BB2KXLXZ Move the build time chart to the job page
  • [107] YOA2RTLE plain-reload.tt: Properly escape tail content.
  • [108] KI423DCQ Stream logs if possible and remove size limit
  • [109] 2T3XCADO Build.pm: Don't get isChannel using buildproducts.
  • [110] YW66LY44 * hydra: enable pp'ing of logs for bigger files again
  • [111] KKJNJHO5 Update bootstrap to 2.0.3
  • [112] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [113] TRDGNILT Remove unused file
  • [114] FHOH54HQ When searching a path / drv path, use separate queries for both options to prevent seq. scan.
  • [115] KZ55DLPH Fix UTF-8 handling of log files
  • [116] HRAFVVOE make logo configurable via HYDRA_LOGO env var
  • [117] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [118] ZB3JV52W Add a "My jobsets" tab to the dashboard
  • [119] QE253KG4 * Option to show the tail of a log.
  • [120] KSBB33RE Add a dashboard
  • [121] J5UVLXOK * Start of a basic Catalyst web interface.
  • [122] FNHGYTB4 Tweak
  • [123] KXGOUX7P * Creating releases.
  • [124] XKXMU5PV Ellipsize long jobset/job names to prevent bootstrap navbar breakage
  • [125] PY4WQF5G remove ascii escapes from log in tail page and emails
  • [126] ZH6B56XR Try harder to find build logs
  • [127] R2PON6R7 Allow non-admin users to see the machine status page
  • [128] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.
  • [129] O776XDS2 Make getDrvLogPath work with both bucketed and non-bucketed nix logs.
  • [130] VCG6KNUX Remove the "clone build" feature
  • [131] 6KIJX24R Get rid of unnecessary [%- and -%] tags
  • [132] 4JPNFWRB * Use jquery for the logfile manipulation.
  • [133] J3RYO2CU Remove the jobs status page
  • [134] GJFYEU3S * Nix now stores logs by default as bzip2, make sure the build page uncompresses before showing.
  • [135] 5AIYUMTB Basic remote building
  • [136] CAFO4ATE Always show the build duration (using the cached build if necessary)
  • [137] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [138] 6Q2JPSWG Fix lazy tab loading
  • [139] LFVXESGI Remove already disabled jobstatus code
  • [140] SZYDW2DG hydra: added some user admin
  • [141] ZFEN2MAO Simplify jobset cloning
  • [142] JFW656FT Add a flag to enable Persona support
  • [143] SYAIW23X Add missing file
  • [144] AS2OXLRM * Editing releases.
  • [145] QTC3SYBM Jobset page: Load the jobs and status tabs on demand
  • [146] UDS5VIT6 Lazy load the metrics tab
  • [*] 2MSFKTD5 Ensure proper encoding of error messages
  • [*] IK53RV4V
  • [*] 2P7VNAAC Move common Javascript code into a separate file

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 9
    [10.156]
    [10.0]
    use File::Basename;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 129
    [10.1443][10.0:117]()
    showLog($c, $mode, $step->busy == 0, $step->drvpath,
    map { $_->path } $step->buildstepoutputs->all);
    [10.1443]
    [10.1554]
    showLog($c, $mode, $step->busy == 0, $step->drvpath);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 136
    [10.171][10.171:281]()
    $c->stash->{build}->drvpath,
    map { $_->path } $c->stash->{build}->buildoutputs->all);
    [10.171]
    [10.1923]
    $c->stash->{build}->drvpath);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 141
    [10.302][10.282:339]()
    my ($c, $mode, $finished, $drvPath, @outPaths) = @_;
    [10.302]
    [10.0]
    my ($c, $mode, $finished, $drvPath) = @_;
  • edit in src/lib/Hydra/Controller/Build.pm at line 143
    [10.24][10.0:1](),[10.339][10.0:1](),[10.341][10.0:1](),[10.755][10.0:1](),[10.334][10.0:1](),[10.1][10.756:808]()
    my $logPath = findLog($c, $drvPath, @outPaths);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 144
    [10.1998][10.386:492]()
    notFound($c, "The build log of derivation ‘$drvPath’ is not available.") unless defined $logPath;
    [10.1998]
    [10.0]
    my $log_uri = $c->uri_for($c->controller('Root')->action_for("log"), [basename($drvPath)]);
  • edit in src/lib/Hydra/Controller/Build.pm at line 146
    [10.1][10.0:345](),[10.145][10.198:199](),[10.244][10.198:199](),[10.345][10.198:199](),[10.486][10.198:199](),[10.492][10.198:199](),[10.198][10.198:199]()
    # Don't send logs that we can't stream.
    my $size = stat($logPath)->size; # FIXME: not so meaningful for compressed logs
    error($c, "This build log is too big to display ($size bytes).") unless
    $mode eq "raw"
    || (($mode eq "tail" || $mode eq "tail-reload") && $logPath !~ /\.bz2$/)
    || $size < 64 * 1024 * 1024;
  • edit in src/lib/Hydra/Controller/Build.pm at line 147
    [10.54]
    [10.637]
    $c->stash->{log_uri} = $log_uri;
  • edit in src/lib/Hydra/Controller/Build.pm at line 149
    [10.679][9.152:206]()
    $c->stash->{logtext} = logContents($logPath);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 152
    [10.759][10.346:387](),[10.387][10.340:383](),[10.383][10.387:431](),[10.387][10.387:431](),[10.240][10.0:44](),[10.447][10.0:44](),[10.396][10.0:44](),[10.44][7.0:55](),[7.55][10.1206:1244](),[10.1206][10.1206:1244](),[10.1244][10.123:156](),[10.123][10.123:156](),[10.156][10.789:850](),[10.850][10.274:307](),[10.1522][10.274:307](),[10.274][10.274:307](),[10.307][10.1016:1091](),[10.332][10.382:433](),[10.699][10.382:433](),[10.1091][10.382:433](),[10.382][10.382:433]()
    $c->stash->{logPath} = $logPath;
    $c->stash->{finished} = $finished;
    $c->forward('Hydra::View::NixLog');
    }
    elsif ($mode eq "tail-reload") {
    my $url = $c->uri_for($c->request->uri->path);
    $url =~ s/tail-reload/tail/g;
    $c->stash->{url} = $url;
    $c->stash->{reload} = !$c->stash->{build}->finished;
    $c->stash->{title} = "";
    $c->stash->{contents} = (scalar logContents($logPath, 50)) || " ";
    $c->stash->{template} = 'plain-reload.tt';
    [10.759]
    [10.797]
    $c->res->redirect($log_uri);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 156
    [10.49][10.1092:1178](),[10.79][10.119:162](),[10.80][10.119:162](),[10.416][10.119:162](),[10.483][10.119:162](),[10.786][10.119:162](),[10.1178][10.119:162](),[10.119][10.119:162]()
    $c->stash->{'plain'} = { data => (scalar logContents($logPath, 50)) || " " };
    $c->forward('Hydra::View::Plain');
    [10.49]
    [10.162]
    my $lines = 50;
    $c->stash->{log_uri} = $log_uri . "?tail=$lines";
    $c->stash->{tail} = $lines;
    $c->stash->{template} = 'log.tt';
  • replacement in src/lib/Hydra/Controller/Build.pm at line 163
    [10.815][10.815:871]()
    error($c, "Unknown log display mode `$mode'.");
    [10.815]
    [10.871]
    error($c, "Unknown log display mode '$mode'.");
  • edit in src/lib/Hydra/Controller/Root.pm at line 13
    [148.12]
    [5.0]
    use File::Basename;
  • edit in src/lib/Hydra/Controller/Root.pm at line 438
    [10.286]
    [10.0]
    sub serveLogFile {
    my ($c, $logPath, $tail) = @_;
    $c->stash->{logPath} = $logPath;
    $c->stash->{tail} = $tail;
    $c->forward('Hydra::View::NixLog');
    }
  • replacement in src/lib/Hydra/Controller/Root.pm at line 446
    [10.27][10.27:59]()
    my ($self, $c, $path) = @_;
    [10.27]
    [10.418]
    my ($self, $c, $drvPath) = @_;
  • replacement in src/lib/Hydra/Controller/Root.pm at line 448
    [10.419][10.60:120]()
    $path = ($ENV{NIX_STORE_DIR} || "/nix/store")."/$path";
    [10.419]
    [10.419]
    $drvPath = "/nix/store/$drvPath";
  • replacement in src/lib/Hydra/Controller/Root.pm at line 450
    [10.420][10.121:284]()
    my @outpaths = ($path);
    my $logPath = findLog($c, $path, @outpaths);
    notFound($c, "The build log of $path is not available.") unless defined $logPath;
    [10.420]
    [10.284]
    my $tail = $c->request->params->{"tail"};
  • replacement in src/lib/Hydra/Controller/Root.pm at line 452
    [10.285][10.448:525](),[10.525][10.402:404](),[10.402][10.402:404]()
    $c->stash->{logPath} = $logPath;
    $c->forward('Hydra::View::NixLog');
    }
    [10.285]
    [10.404]
    die if defined $tail && $tail !~ /^[0-9]+$/;
    my $logFile = findLog($c, $drvPath);
    if (defined $logFile) {
    serveLogFile($c, $logFile, $tail);
    return;
    }
    my $logPrefix = $c->config->{log_prefix};
  • edit in src/lib/Hydra/Controller/Root.pm at line 463
    [10.405]
    [10.405]
    if (defined $logPrefix) {
    $c->res->redirect($logPrefix . "log/" . basename($drvPath));
    } else {
    notFound($c, "The build log of $drvPath is not available.");
    }
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 21
    [10.508][10.508:565]()
    removeAsciiEscapes getDrvLogPath findLog logContents
    [10.508]
    [10.844]
    getDrvLogPath findLog
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 157
    [10.65][10.65:132](),[10.132][10.14898:14961](),[10.14961][10.3154:3288]()
    my $fn = ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix") . "/drvs/";
    my $fn2 = Hydra::Model::DB::getHydraPath . "/build-logs/";
    for ($fn2 . $bucketed, $fn2 . $bucketed . ".bz2", $fn . $bucketed . ".bz2", $fn . $bucketed, $fn . $base . ".bz2", $fn . $base) {
    [10.65]
    [10.15068]
    my $fn = Hydra::Model::DB::getHydraPath . "/build-logs/";
    for ($fn . $bucketed, $fn . $bucketed . ".bz2") {
  • edit in src/lib/Hydra/Helper/Nix.pm at line 191
    [10.3666][10.3666:3668](),[10.3668][10.5599:5600](),[10.5600][10.1313:1314](),[10.1314][10.441:459](),[10.5600][10.441:459](),[10.459][10.2046:2077](),[10.1422][10.487:500](),[10.2077][10.487:500](),[10.487][10.487:500](),[10.500][10.1423:1551](),[10.1551][10.624:641](),[10.624][10.624:641](),[10.641][10.1552:1624](),[10.1624][10.707:713](),[10.707][10.707:713](),[10.713][10.174:210]()
    }
    sub logContents {
    my ($logPath, $tail) = @_;
    my $cmd;
    if ($logPath =~ /.bz2$/) {
    $cmd = "bzip2 -d < $logPath";
    $cmd = $cmd . " | tail -n $tail" if defined $tail;
    }
    else {
    $cmd = defined $tail ? "tail -$tail $logPath" : "cat $logPath";
    }
    return decode("utf-8", `$cmd`);
  • edit in src/lib/Hydra/Helper/Nix.pm at line 194
    [10.1646][10.150:199](),[10.850][10.150:199](),[10.199][2.0:41](),[2.41][10.234:257](),[10.234][10.234:257](),[10.257][10.371:372](),[10.850][10.371:372](),[10.372][10.5601:5602]()
    sub removeAsciiEscapes {
    my ($logtext) = @_;
    $logtext =~ s/\e\[[0-9]*[A-Za-z]//g;
    return $logtext;
    }
  • edit in src/lib/Hydra/View/NixLog.pm at line 15
    [10.791]
    [10.791]
    my $tail = int($c->stash->{tail} // "0");
  • replacement in src/lib/Hydra/View/NixLog.pm at line 19
    [10.824][10.824:877]()
    open $fh, "bzip2 -dc < '$logPath' |" or die;
    [10.824]
    [10.877]
    my $doTail = $tail ? " tail -n '$tail' |" : "";
    open $fh, "bzip2 -dc < '$logPath' | $doTail" or die;
  • replacement in src/lib/Hydra/View/NixLog.pm at line 22
    [10.890][10.890:928]()
    open $fh, "<$logPath" or die;
    [10.890]
    [10.928]
    if ($tail) {
    open $fh, "tail -n '$tail' '$logPath' |" or die;
    } else {
    open $fh, "<$logPath" or die;
    }
  • edit in src/lib/Hydra/View/TT.pm at line 16
    [10.2211]
    [10.2211]
    return 1 if defined $c->config->{log_prefix};
  • edit in src/lib/Hydra/View/TT.pm at line 23
    [10.2392]
    [10.2392]
    return 1 if defined $c->config->{log_prefix};
  • edit in src/lib/Hydra/View/TT.pm at line 28
    [4.91][4.91:92]()
  • file deletion: plain-reload.tt (----------)
    [10.1486][10.383:422](),[10.422][10.1:1]()
    [% WRAPPER layout.tt title="Log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job $build.project.name:$build.jobset.name:$build.job.name" %]
    [% PROCESS common.tt %]
    <p>Below are the last 50 log lines. The <a href="[% c.uri_for('/build' build.id 'log') %]">full log</a> is also available.</p>
    [% IF reload %]
    <script>
    function scrollDown() {
    $("#contents").scrollTop($("#contents").get(0).scrollHeight);
    }
    function injectTail() {
    $.ajax({
    url: "[% url %]",
    dataType: "text",
    success: function (tail) {
    $("#contents").text(tail);
    }
    });
    }
    $(document).ready(function() {
    injectTail();
    setInterval(injectTail, 5000);
    });
    </script>
    [% END %]
    <pre class="taillog" id="contents">
    [% HTML.escape(contents) %]
    </pre>
    [% END %]
    scrollDown();
    scrollDown();
    [% project = build.project %]
    [% jobset = build.jobset %]
    [% job = build.job %]
  • replacement in src/root/build.tt at line 10
    [10.2034][10.2034:2087]()
    FOR step IN steps; IF step.busy; busy = 1; END; END;
    [10.2034]
    [10.2087]
    building = 0;
    FOR step IN steps;
    IF step.busy;
    busy = 1;
    IF step.drvpath == build.drvpath; building = 1; END;
    END;
    END;
  • replacement in src/root/build.tt at line 216
    [10.3656][6.0:131]()
    [% IF (!isAggregate || !build.ischannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
    [10.3656]
    [10.535]
    [% actualBuild = build.iscachedbuild ? cachedBuild : build %]
    [% IF (!isAggregate || !build.ischannel) && build.finished; %]
  • replacement in src/root/build.tt at line 229
    [10.59][6.132:213]()
    [% IF (!isAggregate || !build.ischannel) && buildLogExists(build) %]
    [10.59]
    [10.6492]
    [% IF (!build.finished && building) || (build.finished && (!isAggregate || !build.ischannel) && buildLogExists(build)) %]
  • replacement in src/root/build.tt at line 233
    [10.6532][10.3739:4057]()
    <a class="btn btn-mini" href="[% c.uri_for('/build' build.id 'log') %]">pretty</a>
    <a class="btn btn-mini" href="[% c.uri_for('/build' build.id 'log' 'raw') %]">raw</a>
    <a class="btn btn-mini" href="[% c.uri_for('/build' build.id 'log' 'tail-reload') %]">tail</a>
    [10.6532]
    [10.6622]
    <a class="btn btn-mini" href="[% c.uri_for('/build' actualBuild.id 'log') %]">pretty</a>
    <a class="btn btn-mini" href="[% c.uri_for('/build' actualBuild.id 'log' 'raw') %]">raw</a>
    <a class="btn btn-mini" href="[% c.uri_for('/build' actualBuild.id 'log' 'tail') %]">tail</a>
  • replacement in src/root/common.tt at line 468
    [10.11401][10.1011:1162]()
    (<a [% IF inRow %]class="row-link"[% END %] href="[% url %]">log</a>, <a href="[% "$url/raw" %]">raw</a>, <a href="[% "$url/tail-reload" %]">tail</a>)
    [10.11401]
    [10.210]
    (<a [% IF inRow %]class="row-link"[% END %] href="[% url %]">log</a>, <a href="[% "$url/raw" %]">raw</a>, <a href="[% "$url/tail" %]">tail</a>)
  • replacement in src/root/log.tt at line 5
    [10.591][10.15317:15419]()
    This is the build log of derivation <tt>[% IF step; step.drvpath; ELSE; build.drvpath; END %]</tt>.
    [10.591]
    [10.687]
    Below
    [% IF tail %]
    are the last lines of
    [% ELSE %]
    is
    [% END %]
    the build log of derivation <tt>[% IF step; step.drvpath; ELSE; build.drvpath; END %]</tt>.
  • edit in src/root/log.tt at line 14
    [10.768]
    [10.768]
    [% END %]
    [% IF tail %]
    The <a href="[% step ? c.uri_for('/build' build.id 'nixlog' step.stepnr)
    : c.uri_for('/build' build.id 'log') %]">full log</a> is also available.
  • replacement in src/root/log.tt at line 21
    [10.11896][9.207:270]()
    <pre class="taillog" id="contents">
    [% HTML.escape(logtext) %]
    [10.11896]
    [9.270]
    <pre class="log" id="contents">
    <em>Loading...</em>
  • edit in src/root/log.tt at line 24
    [9.277]
    [10.11963]
    <script type="text/javascript">
    $(document).ready(function() {
    requestPlainFile({
    url: "[% HTML.escape(log_uri) %]",
    dataType: "text",
    type: 'GET',
    success: function (log_data) {
    [% IF tail %]
    /* The server may give us a full log (e.g. if the log is in
    S3). So extract the last lines. */
    log_data = log_data.split("\n").slice(-[%tail%]).join("\n");
    [% END %]
    $("#contents").text(log_data);
    },
    error: function () {
    bootbox.alert("The log file is not available.");
    $("#contents").text("(Unavailable)");
    }
    });
    });
    </script>
  • replacement in src/root/machine-status.tt at line 45
    [8.788][8.788:930]()
    <td><a class="row-link" href="[% c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail-reload') %]">[% step.stepnr %]</a></td>
    [8.788]
    [10.1149]
    <td><a class="row-link" href="[% c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail') %]">[% step.stepnr %]</a></td>
  • replacement in src/root/static/css/hydra.css at line 122
    [10.78][9.572:595]()
    pre.log, pre.taillog {
    [10.78]
    [10.92]
    pre.log {
  • edit in src/root/static/js/common.js at line 121
    [10.3699]
    [10.3699]
    };
    function requestFile(args) {
    if (!"error" in args) {
    args.error = function(data) {
    json = {};
    try {
    if (data.responseText)
    json = $.parseJSON(data.responseText);
    } catch (err) {
    }
    if (json.error)
    bootbox.alert(escapeHTML(json.error));
    else if (data.responseText)
    bootbox.alert("Server error: " + escapeHTML(data.responseText));
    else
    bootbox.alert("Unknown server error!");
    if (args.postError) args.postError(data);
    };
    }
    return $.ajax(args);
  • replacement in src/root/static/js/common.js at line 146
    [10.2360][10.2360:2541]()
    args.error = function(data) {
    json = {};
    try {
    if (data.responseText)
    json = $.parseJSON(data.responseText);
    } catch (err) {
    [10.2360]
    [10.2541]
    requestFile(args);
    };
    function requestPlainFile(args) {
    args.dataType = 'text';
    /* Remove the X-Requested-With header, which would turn trigger
    CORS checks for this request.
    http://stackoverflow.com/a/24719409/6747243
    */
    args.xhr = function() {
    var xhr = jQuery.ajaxSettings.xhr();
    var setRequestHeader = xhr.setRequestHeader;
    xhr.setRequestHeader = function(name, value) {
    if (name == 'X-Requested-With') return;
    setRequestHeader.call(this, name, value);
  • replacement in src/root/static/js/common.js at line 162
    [10.2551][10.2551:2575](),[10.2575][10.3733:3784](),[10.3784][10.2614:2650](),[10.2614][10.2614:2650](),[10.2650][10.3785:3862](),[10.3862][10.2715:2780](),[10.2715][10.2715:2780](),[10.2780][10.565:615]()
    if (json.error)
    bootbox.alert(escapeHTML(json.error));
    else if (data.responseText)
    bootbox.alert("Server error: " + escapeHTML(data.responseText));
    else
    bootbox.alert("Unknown server error!");
    if (args.postError) args.postError(data);
    [10.2551]
    [10.2780]
    return xhr;
  • replacement in src/root/static/js/common.js at line 164
    [10.2787][10.2787:2812]()
    return $.ajax(args);
    [10.2787]
    [10.3863]
    requestFile(args);
  • replacement in src/root/steps.tt at line 28
    [10.1943][10.1943:2084]()
    <td><a class="row-link" href="[% c.uri_for('/build' step.build.id 'nixlog' step.stepnr 'tail-reload') %]">[% step.stepnr %]</a></td>
    [10.1943]
    [10.2084]
    <td><a class="row-link" href="[% c.uri_for('/build' step.build.id 'nixlog' step.stepnr 'tail') %]">[% step.stepnr %]</a></td>