* hydra: buildpage, show changes since last build/successful build

[?]
Feb 22, 2010, 1:21 PM
KAZWI5G4DN2WUW7L2KWZR3D3QQJON4ISQYP7CRLC5HAOPIDYQGRQC

Dependencies

  • [2] CEARA7OH * hydra: show running buildsteps on build page
  • [3] 7UJ5YV4V * Provide a channel for each project containing all the latest
  • [4] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [5] CS7T2XFI
  • [6] TW5ZQX5Z * Move up the build products in the builds page, since they're more
  • [7] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [8] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [9] Z6MDQIGO * A quick (non-Web 2.0) interface to manually add builds to a release.
  • [10] LBNVQXUB * Build the /build stuff in a separate controller.
  • [11] UWVMQIAC * Refactoring.
  • [12] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [13] WRIU3S5E * UI for cloning builds (not functional yet).
  • [*] 5NO7NCKT * Refactoring.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] IK53RV4V

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 18
    [3.466]
    [15.818]
    $c->stash->{prevBuild} = getPreviousBuild($c, $c->stash->{build});
    $c->stash->{prevSuccessfulBuild} = getPreviousSuccessfulBuild($c, $c->stash->{build});
  • edit in src/lib/Hydra/Controller/Build.pm at line 27
    [3.685][3.685:686]()
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 10
    [3.125][3.1574:1635]()
    getBuild getBuildStats joinWithResultInfo getChannelData
    [3.125]
    [3.9702]
    getBuild getPreviousBuild getPreviousSuccessfulBuild getBuildStats joinWithResultInfo getChannelData
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 22
    [3.3706]
    [3.9781]
    }
    sub getPreviousBuild {
    my ($c, $build) = @_;
    (my $prevBuild) = $c->model('DB::Builds')->search(
    { finished => 1
    , system => $build->system
    , project => $build->project->name
    , jobset => $build->jobset->name
    , job => $build->job->name
    , 'me.id' => { '<' => $build->id }
    }, {rows => 1, order_by => "id DESC"});
    return $prevBuild;
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 38
    [3.9784]
    [3.9784]
    sub getPreviousSuccessfulBuild {
    my ($c, $build) = @_;
    (my $prevBuild) = joinWithResultInfo($c, $c->model('DB::Builds'))->search(
    { finished => 1
    , system => $build->system
    , project => $build->project->name
    , jobset => $build->jobset->name
    , job => $build->job->name
    , buildstatus => 0
    , 'me.id' => { '<' => $build->id }
    }, {rows => 1, order_by => "id DESC"});
    return $prevBuild;
    }
  • replacement in src/root/build.tt at line 178
    [3.1107][2.169:210]()
    [% IF !build.finished %]
    [3.1107]
    [2.210]
    [% IF !build.finished %]
  • edit in src/root/build.tt at line 386
    [3.13658]
    [3.13658]
    [% IF prevBuild %]
    <h2>Changes since previous build : [% INCLUDE renderFullBuildLink build=prevBuild %]</h2>
    [% INCLUDE renderInputDiff build2=build , build1=prevBuild %]
    [% END %]
    [% IF prevBuild && prevSuccessfulBuild.id != prevBuild.id %]
    <h2>Changes since previous successful build : [% INCLUDE renderFullBuildLink build=prevSuccessfulBuild %]</h2>
    [% INCLUDE renderInputDiff build2=build , build1=prevSuccessfulBuild %]
    [% END %]
  • edit in src/root/common.tt at line 267
    [3.17969]
    [3.17969]
    [% BLOCK renderInputValue %]
    [% IF input.type == "build" || input.type == "sysbuild" %]
    [% INCLUDE renderFullBuildLink build=input.dependency %]</a>
    [% ELSIF input.type == "string" || input.type == "boolean" %]
    <tt>"[% input.value %]"</tt>
    [% ELSE %]
    <tt>[% input.uri %][% IF input.revision %] (r. [% input.revision %])[% END %]</tt>
    [% END %]
    [% END %]
  • edit in src/root/common.tt at line 278
    [3.17970]
    [% BLOCK renderInputDiff; %]
    <table class="tablesorter">
    <thead>
    <tr><th>Name</th><th>Change</th></tr>
    </thead>
    <tbody>
    [% FOREACH bi1 IN build1.inputs %]
    [% deletedInput = 1 %]
    [% FOREACH bi2 IN build2.inputs %]
    [% IF bi1.name == bi2.name %]
    <tr>
    [% IF bi1.type == bi2.type %]
    [% IF bi1.value != bi2.value || bi1.uri != bi2.uri || bi1.revision != bi2.revision || bi1.path != bi2.path || bi1.dependency != bi2.dependency %]
    <td>[% bi1.name %]</td>
    <td>
    [% INCLUDE renderInputValue input=bi1 %] to [% INCLUDE renderInputValue input=bi2 %]
    </td>
    [% END %]
    [% ELSE %]
    <td>[% bi1.name %]</td>
    <td>Changed input type from '[% type = bi1.type; inputTypes.$type %]' to '[% type = bi2.type; inputTypes.$type %]'</td>
    [% END %]
    </tr>
    [% deletedInput = 0 %]
    [% END %]
    [% END %]
    [% IF deletedInput == 1 %]
    <tr><td>[% bi1.name %]</td><td>Input not present in this build.</td></tr>
    [% END %]
    [% END %]
    </tbody>
    </table>
    [% END %]