Show dependencies as a tree rather than a list
[?]
Feb 14, 2013, 2:53 PM
YPDYBK5GXGNHZMJWC2EHO3T4BIMYK5LMP2G3ABGHOKGIWV4ONIYACDependencies
- [2]
PMNWRTGJAdd multiple output support - [3]
3PNG7NIBRemove trailing whitespace - [4]
CQTN62OHDie tabs die - [5]
ZI535LI6* hydra: 'new' UI for project/jobset/job/build - [6]
GJFYEU3S* Nix now stores logs by default as bzip2, make sure the build page uncompresses before showing. - [7]
OD5FSS5A* Quick hack to allow viewing of dependency graphs (via nix-store -q - [8]
XDDCO6CH* hydra: add dependency list with links to logfiles - [*]
LBNVQXUB* Build the /build stuff in a separate controller. - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
IK53RV4V - [*]
Q4VDOA76Replace last 5 builds on jobset page with last 5 evaluations. Moved hide/unhide and evaluate options to jobset topmenu.
Change contents
- edit in src/lib/Hydra/Controller/Build.pm at line 307
- edit in src/lib/Hydra/Controller/Build.pm at line 309
sub getDependencyGraph {my ($self, $c, $runtime, $done, $path) = @_;my $node = $$done{$path}; - edit in src/lib/Hydra/Controller/Build.pm at line 313
if (!defined $node) {$path =~ /\/[a-z0-9]+-(.*)$/;my $name = $1 // $path;$name =~ s/\.drv$//;$node ={ path => $path, name => $name, buildStep => $runtime? findBuildStepByOutPath($self, $c, $path, 0): findBuildStepByDrvPath($self, $c, $path, 0)};$$done{$path} = $node;my @refs;foreach my $ref (queryReferences($path)) {next if $ref eq $path;next unless $runtime || $ref =~ /\.drv$/;getDependencyGraph($self, $c, $runtime, $done, $ref);push @refs, $ref;}# Show in reverse topological order to flatten the graph.# Should probably do a proper BFS.my @sorted = reverse topoSortPaths(@refs);$node->{refs} = [map { $$done{$_} } @sorted];}return $node;} - edit in src/lib/Hydra/Controller/Build.pm at line 351[2.2669]→[3.609:610](∅→∅),[3.329]→[3.609:610](∅→∅),[3.610]→[2.2670:2762](∅→∅),[2.2762]→[3.363:391](∅→∅),[3.363]→[3.363:391](∅→∅),[3.518]→[3.611:612](∅→∅),[3.612]→[2.2763:2851](∅→∅),[2.2851]→[3.550:576](∅→∅),[3.550]→[3.550:576](∅→∅)
my @buildtimepaths = $c->stash->{drvAvailable} ? computeFSClosure(0, 0, $drvPath) : ();my @buildtimedeps = ();my @runtimepaths = $c->stash->{available} ? computeFSClosure(0, 0, @outPaths) : ();my @runtimedeps = (); - replacement in src/lib/Hydra/Controller/Build.pm at line 352[3.614]→[3.706:744](∅→∅),[3.706]→[3.706:744](∅→∅),[3.744]→[2.2852:3015](∅→∅),[2.3015]→[3.1413:1450](∅→∅),[3.1413]→[3.1413:1450](∅→∅)
foreach my $p (@buildtimepaths) {next unless $p =~ /\.drv$/;my ($buildStep) = findBuildStepByDrvPath($self, $c, $p, 0);my %dep = ( buildstep => $buildStep, path => $p );push(@buildtimedeps, \%dep);if ($c->stash->{available}) {my $done = {};$c->stash->{runtimeGraph} = [ map { getDependencyGraph($self, $c, 1, $done, $_) } @outPaths ]; - replacement in src/lib/Hydra/Controller/Build.pm at line 357[3.944]→[3.944:980](∅→∅),[3.980]→[2.3016:3143](∅→∅),[2.3143]→[3.1619:1654](∅→∅),[3.1619]→[3.1619:1654](∅→∅)
foreach my $p (@runtimepaths) {my ($buildStep) = findBuildStepByOutPath($self, $c, $p, 0);my %dep = ( buildstep => $buildStep, path => $p );push(@runtimedeps, \%dep);if ($c->stash->{drvAvailable}) {my $done = {};$c->stash->{buildTimeGraph} = getDependencyGraph($self, $c, 0, $done, $drvPath); - edit in src/lib/Hydra/Controller/Build.pm at line 362
$c->stash->{buildtimedeps} = \@buildtimedeps;$c->stash->{runtimedeps} = \@runtimedeps; - edit in src/root/build.tt at line 55
[% END %][% IF has_log %](<a href="[% log %]">log</a>, <a href="[% "$log/raw" %]">raw</a>, <a href="[% "$log/tail-reload" %]">tail</a>) - edit in src/root/build.tt at line 56
[%%] [%+ IF has_log; INCLUDE renderLogLinks url=log; END %] - edit in src/root/common.tt at line 478[13.2181]
[% BLOCK renderLogLinks %](<a href="[% url %]">log</a>, <a href="[% "$url/raw" %]">raw</a>, <a href="[% "$url/tail-reload" %]">tail</a>)[% END %] - replacement in src/root/deps.tt at line 9[3.1895]→[3.1895:1937](∅→∅),[3.1937]→[2.14958:14988](∅→∅),[2.14988]→[3.1991:2030](∅→∅),[3.1991]→[3.1991:2030](∅→∅)
<a name="runtime"></a>[% IF available %]<h1>Runtime dependencies</h1><ul>[% FOREACH dep IN runtimedeps -%][% BLOCK renderNode %] - replacement in src/root/deps.tt at line 11
[% IF dep.buildstep %]<a href="[% c.uri_for('/build' dep.buildstep.get_column('build') 'nixlog' dep.buildstep.stepnr) %]">[% dep.path %]</a>[% IF done.${node.path} %]<p><tt>[% node.name %]</tt> (<em>repeated</em>)</p> - replacement in src/root/deps.tt at line 14
[% dep.path %][% done.${node.path} = 1 %]<p>[% IF node.buildStep %]<a href="[% c.uri_for('/build' node.buildStep.get_column('build')) %]"><tt>[% node.name %]</tt></a> [%IF log_exists(node.buildStep.drvpath);INCLUDE renderLogLinks url=c.uri_for('/build' node.buildStep.get_column('build') 'nixlog' node.buildStep.stepnr);END %][% ELSE %]<tt>[% node.name %]</tt>[% END %]</p>[% IF node.refs.size > 0 %]<ul>[% FOREACH ref IN node.refs; INCLUDE renderNode node=ref; END %]</ul>[% END %] - edit in src/root/deps.tt at line 33
<a name="runtime"></a><h2>Runtime dependency graph</h2>[% IF available %]<ul>[% done={}; FOREACH node IN runtimeGraph; INCLUDE renderNode; END %] - replacement in src/root/deps.tt at line 41
Path not available anymore!<br /><p><em>No longer available.</em></p> - edit in src/root/deps.tt at line 45
<h2>Build-time dependency graph</h2> - edit in src/root/deps.tt at line 47
<h1>Build time dependencies</h1> - replacement in src/root/deps.tt at line 48[3.2429]→[3.2429:2472](∅→∅),[3.2472]→[3.21943:21970](∅→∅),[3.21970]→[3.2500:2693](∅→∅),[3.2500]→[3.2500:2693](∅→∅)
[% 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 %][% INCLUDE renderNode node=buildTimeGraph %] - replacement in src/root/deps.tt at line 51
Derivation not available anymore!<br /><p><em>No longer available.</em></p>