* In the job status and error pages, show when the status of a job

[?]
Jul 9, 2009, 2:48 PM
RAKTHYAIX757GPYWCHOE5H5RD3QYKQW3QKLWUIUKPHQ5QGWQXWQQC

Dependencies

  • [2] TCHEWSZL * The "latest" channel shouldn't contain inactive jobs.
  • [3] K4C6DNSM changed queries for compatibility with postgresql
  • [4] 7ZSVXUGF sequence fix for postgresql
  • [5] OG7BEM57
  • [6] YTSIRIMK * Separate job status and all builds pages.
  • [7] 2AIIYGI5 * Show job status and all builds for a project.
  • [8] 7PYQLDQL Added sequences for auto increment primary key columns (for PostgreSQL)
  • [9] UWVMQIAC * Refactoring.
  • [10] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [11] FHF6IZJQ * Basic release management: releases are now dynamically computed as
  • [12] EJFVQ33S * In the job status page and the channels, pick the build with the
  • [13] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [14] ZD5AEKWM * Job status / error pages: show only active jobs.
  • [15] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [16] 7Z3YOKCV * PROCESS -> INCLUDE in most cases. INCLUDE does proper scoping of
  • [17] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [18] T2232OBS * Add some DB indices to make the /releases page much faster.
  • [*] UUGBVEGY * Development notes.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] IK53RV4V
  • [*] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in doc/dev-notes.txt at line 132
    [5.275]
    * select x.project, x.jobset, x.job, x.system, x.id, x.timestamp, r.buildstatus, b.id, b.timestamp
    from (select project, jobset, job, system, max(id) as id from Builds where finished = 1 group by project, jobset, job, system) as a_
    natural join Builds x
    natural join BuildResultInfo r
    left join Builds b on b.id =
    (select max(id) from builds c
    natural join buildresultinfo r2
    where x.project = c.project and x.jobset = c.jobset and x.job = c.job and x.system = c.system
    and x.id > c.id and r.buildstatus != r2.buildstatus);
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 17
    [6.261][6.261:272]()
    })
    [6.261]
    [2.75]
    });
  • edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 29
    [6.166]
    [6.327]
    $latest = $latest->search(
    {},
    { '+select' => ["me.statusChangeId", "me.statusChangeTime"]
    , '+as' => ["statusChangeId", "statusChangeTime"]
    , order_by => "statusChangeTime DESC"
    });
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 59
    [6.534][6.417:490]()
    [getJobStatus($self, $c)->search({buildstatus => {'!=' => 0}})];
    [6.534]
    [6.330]
    [getJobStatus($self, $c)->search({'me.buildstatus' => {'!=' => 0}})];
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 196
    [4.171][4.171:290]()
    my $hydradbi = getHydraDBPath ;
    if ($hydradbi =~ m/^dbi:Pg/) {
    __PACKAGE__->sequence('builds_id_seq');
    }
    [4.171]
    [6.165]
    my $hydradbi = getHydraDBPath;
    if ($hydradbi =~ m/^dbi:Pg/) {
    __PACKAGE__->sequence('builds_id_seq');
    }
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 213
    [6.2536][3.0:481]()
    makeSource('JobStatus' . $name, "select * from (select project, jobset, job, system, max(id) as id from Builds where finished = 1 $constraint group by project, jobset, job, system) as a natural join Builds");
    makeSource('LatestSucceeded' . $name, "select * from (select project, jobset, job, system, max(id) as id from Builds natural join BuildResultInfo where finished = 1 and buildStatus = 0 $constraint group by project, jobset, job, system) as a natural join Builds");
    [6.2536]
    [6.3029]
    my $joinWithStatusChange =
    "natural join BuildResultInfo r " .
    "left join Builds b on b.id = " .
    "(select max(id) from builds c natural join buildresultinfo r2 " .
    " where x.project = c.project and x.jobset = c.jobset and x.job = c.job and x.system = c.system and " .
    " x.id > c.id and r.buildstatus != r2.buildstatus)";
    makeSource('JobStatus' . $name, "select *, b.id statusChangeId, b.timestamp statusChangeTime from (select project, jobset, job, system, max(id) as id from Builds where finished = 1 $constraint group by project, jobset, job, system) as latest natural join Builds x $joinWithStatusChange");
    makeSource('LatestSucceeded' . $name, "select * from (select project, jobset, job, system, max(id) as id from Builds natural join BuildResultInfo where finished = 1 and buildStatus = 0 $constraint group by project, jobset, job, system) as latest natural join Builds x $joinWithStatusChange");
  • edit in src/root/common.tt at line 76
    [23.1059]
    [23.1059]
    [% IF showStatusChange %]
    <th class="headerSortUp">Last status change</th>
    [% END %]
  • edit in src/root/common.tt at line 111
    [23.2103]
    [23.2103]
    [% IF showStatusChange %]
    <td>
    [% IF build.get_column('statusChangeTime') %]
    <a href="[% c.uri_for('/build' build.get_column('statusChangeId')) %]">
    [% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %]
    </a>
    [% ELSE %]
    <em>never</em>
    [% END %]
    </td>
    [% END %]
  • replacement in src/root/errors.tt at line 70
    [6.2872][6.2872:2922]()
    [% INCLUDE renderBuildList builds=brokenBuilds %]
    [6.2872]
    [6.2922]
    [% INCLUDE renderBuildList builds=brokenBuilds showStatusChange=1 %]
  • replacement in src/root/jobstatus.tt at line 6
    [6.1997][6.1997:2046]()
    <p>Below are the latest builds for each job.</p>
    [6.1997]
    [6.2046]
    <p>Below are the latest builds for each job. It is ordered by the status
    change time (the timestamp of the last build that had a different
    build result status). That is, it shows the jobs that most recently
    changed from failed to successful or vice versa first.</p>
  • replacement in src/root/jobstatus.tt at line 11
    [6.2047][6.1401:1451]()
    [% INCLUDE renderBuildList builds=latestBuilds %]
    [6.2047]
    [6.2097]
    [% INCLUDE renderBuildList builds=latestBuilds showStatusChange=1 %]
  • replacement in src/sql/hydra.sql at line 410
    [6.3395][6.3395:3477]()
    --create index IndexBuildsByJobAndSystem on Builds(project, jobset, job, system);
    [6.3395]
    create index IndexBuildsByJobAndSystem on Builds(project, jobset, job, system);
    create index IndexBuildResultInfo on BuildResultInfo(id); -- primary key index, not created automatically by PostgreSQL