* hydra: add dependency list with links to logfiles

[?]
Jan 22, 2010, 1:31 PM
XDDCO6CHPWGXFV3RSMMUYY45DTXJXQNYYHUT2PCYAGRODK43MD6AC

Dependencies

  • [2] Q24QXGSM * Don't do pretty printing for large logs, because the XSLT processing
  • [3] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [4] WYN733ST * Store build duration, handle cached builds.
  • [5] CS7T2XFI
  • [6] LBNVQXUB * Build the /build stuff in a separate controller.
  • [7] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [8] L2E6EVE2 * Merged the Build and Job tables.
  • [9] FYWE74AA
  • [10] 5NO7NCKT * Refactoring.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 10
    [2.16][3.156:157](),[3.156][3.156:157]()
    [2.16]
    [3.157]
    use Data::Dump qw(dump);
  • edit in src/lib/Hydra/Controller/Build.pm at line 256
    [3.1010]
    [3.1010]
    sub deps : Chained('build') PathPart('deps') {
    my ($self, $c) = @_;
    my $build = $c->stash->{build};
    $c->stash->{available} = isValidPath $build->outpath;
    $c->stash->{drvAvailable} = isValidPath $build->drvpath;
  • edit in src/lib/Hydra/Controller/Build.pm at line 263
    [3.1011]
    [3.1410]
    my $drvpath = $build->drvpath;
    my $outpath = $build->outpath;
    my @buildtimepaths = ();
    my @buildtimedeps = ();
    @buildtimepaths = split '\n', `nix-store --query --requisites --include-outputs $drvpath` if isValidPath($build->drvpath);
    my @runtimepaths = ();
    my @runtimedeps = ();
    @runtimepaths = split '\n', `nix-store --query --requisites --include-outputs $outpath` if isValidPath($build->outpath);
    foreach my $p (@buildtimepaths) {
    my $buildStep;
    ($buildStep) = $c->model('DB::BuildSteps')->search({ outpath => $p }, {}) ;
    my %dep = ( buildstep => $buildStep, path => $p ) ;
    push(@buildtimedeps, \%dep);
    }
    foreach my $p (@runtimepaths) {
    my $buildStep;
    ($buildStep) = $c->model('DB::BuildSteps')->search({ outpath => $p }, {}) ;
    my %dep = ( buildstep => $buildStep, path => $p ) ;
    push(@runtimedeps, \%dep);
    }
    $c->stash->{buildtimedeps} = \@buildtimedeps;
    $c->stash->{runtimedeps} = \@runtimedeps;
    $c->stash->{template} = 'deps.tt';
    }
  • replacement in src/root/build.tt at line 135
    [3.1582][3.1582:1682]()
    (<a href="[% c.uri_for('/build' build.id 'buildtime-deps') %]">build-time dependencies</a>)
    [3.1582]
    [3.1682]
    (build-time dependencies: <a href="[% c.uri_for('/build' build.id 'buildtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#buildtime">list</a>)
  • replacement in src/root/build.tt at line 144
    [3.1778][3.1778:1873]()
    (<a href="[% c.uri_for('/build' build.id 'runtime-deps') %]">runtime dependencies</a>)
    [3.1778]
    [3.1873]
    (runtime dependencies: <a href="[% c.uri_for('/build' build.id 'runtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#runtime">list</a>)
  • file addition: deps.tt (----------)
    [13.1486]
    [% WRAPPER layout.tt title="Job ‘$project.name:$jobset.name:$job.name’ build $id" %]
    [% PROCESS common.tt %]
    [% USE HTML %]
    [% project = build.project %]
    [% jobset = build.jobset %]
    [% job = build.job %]
    <a name="runtime"></a>
    [% IF available %]
    <h1>Runtime dependencies for [% build.outpath %]</h1>
    <ul>
    [% FOREACH dep IN runtimedeps -%]
    <li>
    [% IF dep.buildstep %]
    <a href="[% c.uri_for('/build' dep.buildstep.get_column('build') 'nixlog' dep.buildstep.stepnr) %]">[% dep.path %]</a>
    [% ELSE %]
    [% dep.path %]
    [% END %]
    </li>
    [% END %]
    </ul>
    [% ELSE %]
    Path not available anymore!<br />
    [% END %]
    <a name="buildtime"></a>
    [% IF drvAvailable %]
    <h1>Build time dependencies for [% build.drvpath %]</h1>
    <ul>
    [% FOREACH dep IN buildtimedeps -%]
    <li>
    [% IF dep.buildstep %]
    <a href="[% c.uri_for('/build' dep.buildstep.get_column('build') 'nixlog' dep.buildstep.stepnr) %]">[% dep.path %]</a>
    [% ELSE %]
    [% dep.path %]
    [% END %]
    </li>
    [% END %]
    </ul>
    [% ELSE %]
    Derivation not available anymore!<br />
    [% END %]
    [% END %]