* In the last succeeded / job status queries, use the Builds.isCurrent

[?]
Oct 7, 2009, 3:45 PM
Z4KRJX4QVMQ5F233DC3XMSE5ZJYHKX3UF5QWAGHDC54EC5NUBXUQC

Dependencies

  • [2] CVDK3XJK * In the scheduler, don't check if we've already done a build (except
  • [3] SZYY2EQQ * Make the queries more readable.
  • [4] ZD5AEKWM * Job status / error pages: show only active jobs.
  • [5] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [6] JSG5QEZJ * Only show status changes from successful to failed and failed to
  • [7] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [8] RI4S7SYT * Job status: show the active jobs.
  • [9] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [10] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [11] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [12] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [13] 3HZY24CX * Make jobsets viewable under
  • [14] UWVMQIAC * Refactoring.
  • [15] TCHEWSZL * The "latest" channel shouldn't contain inactive jobs.
  • [16] RAKTHYAI * In the job status and error pages, show when the status of a job
  • [17] AKAZKCR6 * At top-level and for each project, provide two channels: "latest"
  • [*] UUGBVEGY * Development notes.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in doc/dev-notes.txt at line 93
    [2.1]
    [2.1]
    # Add the isCurrent column to Builds and use the obsolete Jobs.active to fill it in.
  • edit in doc/dev-notes.txt at line 95
    [2.62]
    [19.4491]
    update builds set isCurrent = 1 where id in (select max(id) from builds natural join (select distinct b.project, b.jobset, b.job, b.system from builds b join (select project, jobset, name from jobs where active = 1) j on b.project = j.project and b.jobset = j.jobset and b.job = j.name) b2 group by project, jobset, job, system);
  • edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 8
    [4.1][4.1:2](),[4.112][4.112:113](),[4.113][4.0:74](),[4.74][4.144:261](),[4.144][4.144:261](),[4.261][4.559:571](),[4.571][4.75:77](),[4.272][4.75:77]()
    sub filterInactiveJobs {
    my ($build) = @_;
    return $build->search(
    { active => 1 },
    { join => 'job'
    , '+select' => ["job.active"]
    , '+as' => ["active"]
    });
    }
  • edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 14
    [4.189][4.189:232](),[4.232][4.272:326](),[4.272][4.272:326]()
    $latest = filterInactiveJobs($latest)
    unless defined $c->stash->{showInactiveJobs};
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 79
    [4.289][4.233:323]()
    getChannelData($c, scalar(filterInactiveJobs($c->stash->{latestSucceeded})));
    [4.289]
    [4.386]
    getChannelData($c, scalar($c->stash->{latestSucceeded}));
  • edit in src/lib/Hydra/Controller/Job.pm at line 18
    [4.363][4.491:530]()
    $c->stash->{showInactiveJobs} = 1;
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 31
    [4.336][4.336:418]()
    $c->stash->{activeJobs} = [$c->stash->{jobset}->jobs->search({active => 1})];
    [4.336]
    [4.418]
    $c->stash->{activeJobs} = [$c->stash->{jobset}->builds->search({isCurrent => 1}, {select => ["job"], distinct => 1})];
  • edit in src/lib/Hydra/Schema/Builds.pm at line 229
    [3.408]
    [3.408]
    my $activeJobs = "(select distinct project, jobset, job, system from Builds where isCurrent = 1 $constraint)";
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 243
    [3.941][3.941:1036]()
    from Builds where finished = 1 $constraint group by project, jobset, job, system)
    [3.941]
    [3.1036]
    from $activeJobs as activeJobs
    natural join Builds
    where finished = 1
    group by project, jobset, job, system)
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 259
    [3.1302][3.1302:1420]()
    from Builds natural join BuildResultInfo
    where finished = 1 and buildStatus = 0 $constraint
    [3.1302]
    [3.1420]
    from $activeJobs as activeJobs
    natural join Builds
    natural join BuildResultInfo
    where finished = 1 and buildStatus = 0
  • replacement in src/root/jobset.tt at line 121
    [4.12223][4.12223:12346]()
    [% FOREACH j IN activeJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.name %] [% END %]
    [4.12223]
    [4.12346]
    [% FOREACH j IN activeJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.get_column('job') %] [% END %]
  • edit in src/sql/hydra.sql at line 413
    [4.2984]
    [4.2984]
    create index IndexBuildsByIsCurrent on Builds(isCurrent);