Serve raw uncompressed logs directly

[?]
Aug 30, 2013, 6:11 PM
KLSDJV75BBXGL6KJYM23INJZCIIN6JKPP6I2UPJ6P4NPGQUIWAWAC

Dependencies

  • [2] ZH6B56XR Try harder to find build logs
  • [3] IN272KZW * Automatically keep all builds in the latest successful release in
  • [4] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [5] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.
  • [6] RBHHV7P7 * Read logs using logContents function in stead of handling it everywhere separately.
  • [7] SAIUFDP3 hydra: make sure viewing logs works when logs are bz2'd
  • [8] LBNVQXUB * Build the /build stuff in a separate controller.
  • [9] MMDLWWZ2 automatic reload of tail log when build is running
  • [*] 2GK5DOU7 * Downloading closures.

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 148
    [2.808][2.808:845]()
    print STDERR "log = $logPath\n";
  • replacement in src/lib/Hydra/Controller/Build.pm at line 161
    [3.759][2.933:1015](),[3.259][3.353:396](),[3.623][3.353:396](),[2.1015][3.353:396](),[3.353][3.353:396]()
    $c->stash->{'plain'} = { data => (scalar logContents($logPath)) || " " };
    $c->forward('Hydra::View::Plain');
    [3.759]
    [3.0]
    if ($logPath !~ /.bz2$/) {
    $c->serve_static_file($logPath);
    } else {
    $c->stash->{'plain'} = { data => (scalar logContents($logPath)) || " " };
    $c->forward('Hydra::View::Plain');
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 273
    [2.1614][2.1614:1692]()
    my $logPath = getDrvLogPath($drvPath);
    return $logPath if defined $logPath;
    [2.1614]
    [2.1692]
    my $logPath = getDrvLogPath($drvPath);
    return $logPath if defined $logPath;
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 280
    [2.1800][2.1800:1862]()
    { path => { -in => [@outPaths] } },
    { select => ["drvpath"]
    [2.1800]
    [2.1862]
    { path => { -in => [@outPaths] } },
    { select => ["drvpath"]
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 283
    [2.1886][2.1886:1921]()
    , join => "buildstepoutputs"
    });
    [2.1886]
    [2.1921]
    , join => "buildstepoutputs"
    });
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 287
    [2.1954][2.1954:2038]()
    my $logPath = getDrvLogPath($step->drvpath);
    return $logPath if defined $logPath;
    [2.1954]
    [2.2038]
    my $logPath = getDrvLogPath($step->drvpath);
    return $logPath if defined $logPath;