Hydra: In case of failure, also show changes between last succesful build and the first failed build after this

[?]
Jul 14, 2010, 7:31 AM
LUPEGYR76IIJFCEV6QU3VII2DNOHH3W3RHQI77LDFZU7B5QETTHQC

Dependencies

  • [2] 2M7J26V4 inital version of links to diff in scm
  • [3] KAZWI5G4 * hydra: buildpage, show changes since last build/successful build
  • [4] 7UJ5YV4V * Provide a channel for each project containing all the latest
  • [5] CS7T2XFI
  • [6] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [7] LBNVQXUB * Build the /build stuff in a separate controller.
  • [8] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [*] XHK7IGYI * hdyra: show last succeeded build and changes since on build status summary if build has failed

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 25
    [3.162]
    [2.0]
    $c->stash->{firstBrokenBuild} = getNextBuild($c, $c->stash->{prevSuccessfulBuild});
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 10
    [3.125][3.163:268]()
    getBuild getPreviousBuild getPreviousSuccessfulBuild getBuildStats joinWithResultInfo getChannelData
    [3.125]
    [3.9702]
    getBuild getPreviousBuild getNextBuild getPreviousSuccessfulBuild getBuildStats joinWithResultInfo getChannelData
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 36
    [3.661]
    [3.9781]
    }
    sub getNextBuild {
    my ($c, $build) = @_;
    (my $nextBuild) = $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 ASC"});
    return $nextBuild;
  • edit in src/root/build.tt at line 185
    [11.6891]
    [12.126]
    [% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]
    <h2>Changes</h2>
    <p>
    Build [% INCLUDE renderFullBuildLink build=firstBrokenBuild %] is the first build failure after the previous successful build of this job. The changes that might have caused the failure are:
    </p>
    [% INCLUDE renderInputDiff build2=prevSuccessfulBuild , build1=firstBrokenBuild %]
    <br />
    <p/>
    [% END %]