* Make the "latest succeeded" query (used by the "latest" channel)

[?]
Feb 12, 2010, 2:49 PM
2I2ZX6JBPIM5D57G52MGHKUD66CJMOYAYNYN6CSHNUHAFA46A5YQC

Dependencies

  • [2] E2TOU3L6 * More indices.
  • [3] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [4] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [5] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [6] 2QA4Y4G3 * hydra: added index, actual build time (buildstep with same outpath, so without deps) of the build
  • [7] 7UJ5YV4V * Provide a channel for each project containing all the latest
  • [8] SZYY2EQQ * Make the queries more readable.
  • [9] KN3VYE5P * Cleaned up the foreign key constraints.
  • [10] Z4KRJX4Q * In the last succeeded / job status queries, use the Builds.isCurrent
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 68
    [3.2049][3.2049:2158]()
    ->search_literal("exists (select 1 from buildproducts where build = me.id and type = 'nix-build')");
    [3.2049]
    [3.673]
    ->search_literal("exists (select 1 from buildproducts where build = resultInfo.id and type = 'nix-build')");
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 292
    [3.1238][3.1238:1302]()
    (select project, jobset, job, system, max(id) as id
    [3.1238]
    [3.895]
    (select
    (select max(id) from builds b
    where
    project = activeJobs.project and jobset = activeJobs.jobset
    and job = activeJobs.job and system = activeJobs.system
    and finished = 1
    and exists (select 1 from buildresultinfo where id = b.id and buildstatus = 0)
    ) as id
  • edit in src/lib/Hydra/Schema/Builds.pm at line 301
    [3.939][3.939:1066](),[3.1066][3.1420:1471](),[3.1420][3.1420:1471]()
    natural join Builds
    natural join BuildResultInfo
    where finished = 1 and buildStatus = 0
    group by project, jobset, job, system
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 302
    [3.1495][3.1495:1525]()
    natural join Builds
    [3.1495]
    [3.1525]
    join Builds using (id)
  • replacement in src/sql/hydra.sql at line 437
    [3.2638][3.2638:2787]()
    create index IndexBuildsOnJob on Builds(project, jobset, job);
    create index IndexBuildsOnJobAndIsCurrent on Builds(project, jobset, job, isCurrent);
    [3.2638]
    [3.2787]
    #create index IndexBuildsOnJob on Builds(project, jobset, job);
    #create index IndexBuildsOnJobAndIsCurrent on Builds(project, jobset, job, isCurrent);
  • edit in src/sql/hydra.sql at line 443
    [3.3040]
    [2.159]
    create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);