Merge lp:~al-maisan/launchpad/duration-485524 into lp:launchpad/db-devel

Proposed by Muharem Hrnjadovic
Status: Merged
Merged at revision: not available
Proposed branch: lp:~al-maisan/launchpad/duration-485524
Merge into: lp:launchpad/db-devel
Diff against target: 196 lines (+85/-53)
4 files modified
database/sampledata/current-dev.sql (+26/-26)
database/sampledata/current.sql (+26/-26)
database/schema/comments.sql (+1/-1)
database/schema/patch-2207-14-0.sql (+32/-0)
To merge this branch: bzr merge lp:~al-maisan/launchpad/duration-485524
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Needs Information
Stuart Bishop (community) db Approve
Review via email: mp+15068@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

This schema patch relates to the Soyuz build farm generalisation and is to facilitate queries related to the estimation of job dispatch times irrespective of job type.

Revision history for this message
Stuart Bishop (stub) wrote :

Seems fine. patch-2207-14-0.sql

You are citing a rather out of date spec - it is still listing three possible implementations and there is no mention of the column you are adding at all or which of the three possibilities has been chosen.

review: Approve (db)
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

Stuart Bishop wrote:
> Review: Approve db
> Seems fine. patch-2207-14-0.sql
>
> You are citing a rather out of date spec - it is still listing three possible implementations and there is no mention of the column you are adding at all or which of the three possibilities has been chosen.

Hello Stuart,

thank you very much for reviewing this. Sorry for not being more
precise, this patch "builds on" patch-2207-11-0.sql which implements the
bulk of the schema changes for the outdated spec.

Best regards

--
Muharem Hrnjadovic <email address hidden>
Public key id : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC

Revision history for this message
Jonathan Lange (jml) wrote :

Hello Muharem,

I've tried to find you at UDS, but in any case it might be good to talk about this so that folks at home can play along too.

On IRC earlier, we talked a little about possibly moving this column to the Job table -- something that I thought was a sensible sounding idea but wanted a use case. Here, you move the estimated_duration column to the BuildQueue instead.

This, as I understand it, makes the estimated duration a property of a build a property of how it is scheduled, rather than an intrinsic part of the definition of the task. However, I feel my understanding is uncertain.

In your original comment, you say that this patch is supposed to make it possible to get job dispatch times irrespective of job type. However, given that you've almost certainly thought about this more than I have, I'd really appreciate it if you could add some information about how this achieves that goal, why it's the best solution, what trade-offs this makes (if any), and maybe give me a hint as to why the column placed onto the Build table in the first place.

Thanks,
jml

review: Needs Information
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

Jonathan Lange wrote:
> Review: Needs Information
> Hello Muharem,
>
> I've tried to find you at UDS, but in any case it might be good to
> talk about this so that folks at home can play along too.
Very true.

> On IRC earlier, we talked a little about possibly moving this column
> to the Job table -- something that I thought was a sensible sounding
> idea but wanted a use case. Here, you move the estimated_duration
> column to the BuildQueue instead.
Hmm .. I was suggesting to move it to the Job table but others (bigjools,
mwhudson) were not unsure whether an estimated job duration and/or
dispatch time is something that applies to any infrastructure that
utilises the Job table or to the (Soyuz) build farm only.
Due to that we thought it's best to contain the change to the
(Soyuz) build farm. Since the `BuildQueue` table is used by all build
farm jobs it was the natural place to put that property.

> This, as I understand it, makes the estimated duration a property of a
> build a property of how it is scheduled, rather than an intrinsic part
> of the definition of the task. However, I feel my understanding is
> uncertain.
This is about the estimation of job dispatch times only. The question
this answers is: "when will my waiting job start executing on a build
farm machine"?

> In your original comment, you say that this patch is supposed to make
> it possible to get job dispatch times irrespective of job type.
> However, given that you've almost certainly thought about this more
> than I have, I'd really appreciate it if you could add some
> information about how this achieves that goal, why it's the best
> solution, what trade-offs this makes (if any), and maybe give me a
> hint as to why the column placed onto the Build table in the first
> place.
Right. Putting the 'estimated_build_duration' on the `Build` table was a
design mistake that was exposed by the necessity to support the
estimation of job dispatch times irrespective of job type i.e. for
source package builds, recipe builds etc.

The job dispatch times for a given build farm job BFJ are calculated
based on 2 ingredients: the

  1 - sum of the estimated durations of the jobs that are ahead of BFJ in
      the queue.
  2 - time span until the next build machine becomes available
      (= min(estimated_duration - (now - job.date_started)) across the
       build machine pool that could run BFJ)

As you can see having a somewhat realistic 'estimated_duration' is
crucial to the quality of the job dispatch time estimation.

Also, in order to be able to formulate less than nightmarish database
queries for the 2 ingredients above we need the 'estimated_duration' to
be in some common place for all build farm job types and that would be
the `BuildQueue` table in this case.

I hope this helps.

Best regards

--
Muharem Hrnjadovic <email address hidden>
Public key id : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC

Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

Muharem Hrnjadovic wrote:
> Jonathan Lange wrote:
>> Review: Needs Information
>> Hello Muharem,
>>
>> I've tried to find you at UDS, but in any case it might be good to
>> talk about this so that folks at home can play along too.
> Very true.
>
>> On IRC earlier, we talked a little about possibly moving this column
>> to the Job table -- something that I thought was a sensible sounding
>> idea but wanted a use case. Here, you move the estimated_duration
>> column to the BuildQueue instead.
> Hmm .. I was suggesting to move it to the Job table but others (bigjools,
> mwhudson) were not unsure whether an estimated job duration and/or
s/not unsure/unsure/
*sigh*
> dispatch time is something that applies to any infrastructure that
> utilises the Job table or to the (Soyuz) build farm only.
> Due to that we thought it's best to contain the change to the
> (Soyuz) build farm. Since the `BuildQueue` table is used by all build
> farm jobs it was the natural place to put that property.
>
>> This, as I understand it, makes the estimated duration a property of a
>> build a property of how it is scheduled, rather than an intrinsic part
>> of the definition of the task. However, I feel my understanding is
>> uncertain.
> This is about the estimation of job dispatch times only. The question
> this answers is: "when will my waiting job start executing on a build
> farm machine"?
>
>> In your original comment, you say that this patch is supposed to make
>> it possible to get job dispatch times irrespective of job type.
>> However, given that you've almost certainly thought about this more
>> than I have, I'd really appreciate it if you could add some
>> information about how this achieves that goal, why it's the best
>> solution, what trade-offs this makes (if any), and maybe give me a
>> hint as to why the column placed onto the Build table in the first
>> place.
> Right. Putting the 'estimated_build_duration' on the `Build` table was a
> design mistake that was exposed by the necessity to support the
> estimation of job dispatch times irrespective of job type i.e. for
> source package builds, recipe builds etc.
>
> The job dispatch times for a given build farm job BFJ are calculated
> based on 2 ingredients: the
>
> 1 - sum of the estimated durations of the jobs that are ahead of BFJ in
> the queue.
> 2 - time span until the next build machine becomes available
> (= min(estimated_duration - (now - job.date_started)) across the
> build machine pool that could run BFJ)
>
> As you can see having a somewhat realistic 'estimated_duration' is
> crucial to the quality of the job dispatch time estimation.
>
> Also, in order to be able to formulate less than nightmarish database
> queries for the 2 ingredients above we need the 'estimated_duration' to
> be in some common place for all build farm job types and that would be
> the `BuildQueue` table in this case.
>
> I hope this helps.
>
> Best regards
>

Best regards

--
Muharem Hrnjadovic <email address hidden>
Public key id : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/sampledata/current-dev.sql'
2--- database/sampledata/current-dev.sql 2009-11-16 22:06:14 +0000
3+++ database/sampledata/current-dev.sql 2009-11-20 13:57:18 +0000
4@@ -1666,30 +1666,30 @@
5
6 ALTER TABLE build DISABLE TRIGGER ALL;
7
8-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (2, '2004-09-27 11:57:13', 1, 1, 1, '2004-09-27 11:57:14', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
9-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (6, '2006-12-01 00:00:00', 1, 1, 2, '2006-12-01 00:00:01', '00:00:01', 1, 1, 32, 0, NULL, 1, NULL, NULL, NULL, NULL);
10-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (7, '2005-03-24 00:00:00', 1, 6, 1, '2005-03-25 00:00:03', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
11-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (8, '2005-09-30 00:00:00', 1, 6, 6, NULL, NULL, NULL, NULL, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
12-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (9, '2005-10-01 00:00:00', 1, 1, 2, '2005-10-02 00:00:01', '00:03:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
13-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (10, '2006-01-27 00:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 26, 0, NULL, 1, NULL, NULL, NULL, NULL);
14-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (11, '2006-02-14 00:00:00', 1, 6, 0, NULL, NULL, NULL, NULL, 25, 0, NULL, 1, '00:01:00', NULL, NULL, NULL);
15-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (12, '2006-02-28 00:00:00', 1, 6, 3, '2006-02-28 00:00:01', '00:06:02', 1, 1, 27, 0, 'cpp (>= 4:4.0.1-3), gcc-4.0 (>= 4.0.1-2)', 1, NULL, NULL, NULL, NULL);
16-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (13, '2006-03-21 00:00:00', 1, 1, 5, '2006-03-21 01:00:03', '00:01:30', 1, 1, 17, 0, NULL, 1, NULL, NULL, NULL, NULL);
17-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (14, '2006-03-22 00:00:00', 1, 1, 5, '2006-03-21 01:00:02', '00:01:30', 1, 1, 28, 0, NULL, 1, NULL, NULL, NULL, NULL);
18-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (15, '2006-03-22 00:00:01', 1, 1, 5, '2006-03-21 01:00:00', '00:01:30', 1, 1, 29, 0, NULL, 1, NULL, NULL, NULL, NULL);
19-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (16, '2005-03-24 00:00:01', 1, 11, 1, '2005-03-25 00:00:02', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
20-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (18, '2004-09-27 11:57:14', 1, 8, 1, '2004-09-27 11:57:13', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
21-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (19, '2005-03-24 00:00:02', 1, 8, 1, '2005-03-25 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
22-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (21, '2006-12-01 00:00:01', 1, 1, 2, NULL, NULL, NULL, NULL, 33, 0, NULL, 1, NULL, NULL, NULL, NULL);
23-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (22, '2007-04-20 00:00:00', 1, 8, 7, '2007-04-20 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 1, NULL, NULL, NULL, 91);
24-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (23, '2006-04-11 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 1, NULL, NULL, NULL, NULL);
25-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (24, '2007-05-30 00:00:00', 1, 1, 2, '2007-05-30 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 11, NULL, NULL, NULL, NULL);
26-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (25, '2007-07-08 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 9, NULL, NULL, NULL, NULL);
27-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (26, '2007-07-08 00:00:00', 1, 8, 2, '2007-07-08 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 9, NULL, NULL, NULL, NULL);
28-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (27, '2007-07-24 00:00:00', 1, 1, 1, '2007-07-24 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 9, NULL, NULL, NULL, NULL);
29-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (28, '2007-08-10 00:00:00', 3, 12, 1, '2007-08-10 00:00:13', '00:00:13', 1, 1, 14, 0, NULL, 9, NULL, NULL, NULL, NULL);
30-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (29, '2007-08-09 21:54:18.553132', 1, 8, 1, '2007-08-09 23:59:59', NULL, NULL, NULL, 36, 0, NULL, 12, NULL, NULL, NULL, NULL);
31-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (30, '2007-08-10 00:00:01', 3, 12, 1, '2007-08-10 00:00:14', '00:00:13', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
32+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (2, '2004-09-27 11:57:13', 1, 1, 1, '2004-09-27 11:57:14', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
33+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (6, '2006-12-01 00:00:00', 1, 1, 2, '2006-12-01 00:00:01', '00:00:01', 1, 1, 32, 0, NULL, 1, NULL, NULL, NULL);
34+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (7, '2005-03-24 00:00:00', 1, 6, 1, '2005-03-25 00:00:03', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
35+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (8, '2005-09-30 00:00:00', 1, 6, 6, NULL, NULL, NULL, NULL, 14, 0, NULL, 1, NULL, NULL, NULL);
36+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (9, '2005-10-01 00:00:00', 1, 1, 2, '2005-10-02 00:00:01', '00:03:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
37+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (10, '2006-01-27 00:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 26, 0, NULL, 1, NULL, NULL, NULL);
38+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (11, '2006-02-14 00:00:00', 1, 6, 0, NULL, NULL, NULL, NULL, 25, 0, NULL, 1, NULL, NULL, NULL);
39+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (12, '2006-02-28 00:00:00', 1, 6, 3, '2006-02-28 00:00:01', '00:06:02', 1, 1, 27, 0, 'cpp (>= 4:4.0.1-3), gcc-4.0 (>= 4.0.1-2)', 1, NULL, NULL, NULL);
40+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (13, '2006-03-21 00:00:00', 1, 1, 5, '2006-03-21 01:00:03', '00:01:30', 1, 1, 17, 0, NULL, 1, NULL, NULL, NULL);
41+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (14, '2006-03-22 00:00:00', 1, 1, 5, '2006-03-21 01:00:02', '00:01:30', 1, 1, 28, 0, NULL, 1, NULL, NULL, NULL);
42+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (15, '2006-03-22 00:00:01', 1, 1, 5, '2006-03-21 01:00:00', '00:01:30', 1, 1, 29, 0, NULL, 1, NULL, NULL, NULL);
43+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (16, '2005-03-24 00:00:01', 1, 11, 1, '2005-03-25 00:00:02', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
44+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (18, '2004-09-27 11:57:14', 1, 8, 1, '2004-09-27 11:57:13', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
45+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (19, '2005-03-24 00:00:02', 1, 8, 1, '2005-03-25 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
46+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (21, '2006-12-01 00:00:01', 1, 1, 2, NULL, NULL, NULL, NULL, 33, 0, NULL, 1, NULL, NULL, NULL);
47+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (22, '2007-04-20 00:00:00', 1, 8, 7, '2007-04-20 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 1, NULL, NULL, 91);
48+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (23, '2006-04-11 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 1, NULL, NULL, NULL);
49+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (24, '2007-05-30 00:00:00', 1, 1, 2, '2007-05-30 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 11, NULL, NULL, NULL);
50+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (25, '2007-07-08 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 9, NULL, NULL, NULL);
51+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (26, '2007-07-08 00:00:00', 1, 8, 2, '2007-07-08 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 9, NULL, NULL, NULL);
52+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (27, '2007-07-24 00:00:00', 1, 1, 1, '2007-07-24 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 9, NULL, NULL, NULL);
53+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (28, '2007-08-10 00:00:00', 3, 12, 1, '2007-08-10 00:00:13', '00:00:13', 1, 1, 14, 0, NULL, 9, NULL, NULL, NULL);
54+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (29, '2007-08-09 21:54:18.553132', 1, 8, 1, '2007-08-09 23:59:59', NULL, NULL, NULL, 36, 0, NULL, 12, NULL, NULL, NULL);
55+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (30, '2007-08-10 00:00:01', 3, 12, 1, '2007-08-10 00:00:14', '00:00:13', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
56
57
58 ALTER TABLE build ENABLE TRIGGER ALL;
59@@ -1715,8 +1715,8 @@
60
61 ALTER TABLE buildqueue DISABLE TRIGGER ALL;
62
63-INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type) VALUES (1, 1, 'Dummy sampledata entry, not processing', 1, false, 1, 1);
64-INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type) VALUES (2, NULL, NULL, 10, false, 2, 1);
65+INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type, estimated_duration) VALUES (1, 1, 'Dummy sampledata entry, not processing', 1, false, 1, 1, '00:00:00');
66+INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type, estimated_duration) VALUES (2, NULL, NULL, 10, false, 2, 1, '00:01:00');
67
68
69 ALTER TABLE buildqueue ENABLE TRIGGER ALL;
70
71=== modified file 'database/sampledata/current.sql'
72--- database/sampledata/current.sql 2009-11-16 22:06:14 +0000
73+++ database/sampledata/current.sql 2009-11-20 13:57:18 +0000
74@@ -1648,30 +1648,30 @@
75
76 ALTER TABLE build DISABLE TRIGGER ALL;
77
78-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (2, '2004-09-27 11:57:13', 1, 1, 1, '2004-09-27 11:57:14', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
79-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (6, '2006-12-01 00:00:00', 1, 1, 2, '2006-12-01 00:00:01', '00:00:01', 1, 1, 32, 0, NULL, 1, NULL, NULL, NULL, NULL);
80-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (7, '2005-03-24 00:00:00', 1, 6, 1, '2005-03-25 00:00:03', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
81-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (8, '2005-09-30 00:00:00', 1, 6, 6, NULL, NULL, NULL, NULL, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
82-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (9, '2005-10-01 00:00:00', 1, 1, 2, '2005-10-02 00:00:01', '00:03:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
83-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (10, '2006-01-27 00:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 26, 0, NULL, 1, NULL, NULL, NULL, NULL);
84-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (11, '2006-02-14 00:00:00', 1, 6, 0, NULL, NULL, NULL, NULL, 25, 0, NULL, 1, '00:01:00', NULL, NULL, NULL);
85-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (12, '2006-02-28 00:00:00', 1, 6, 3, '2006-02-28 00:00:01', '00:06:02', 1, 1, 27, 0, 'cpp (>= 4:4.0.1-3), gcc-4.0 (>= 4.0.1-2)', 1, NULL, NULL, NULL, NULL);
86-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (13, '2006-03-21 00:00:00', 1, 1, 5, '2006-03-21 01:00:03', '00:01:30', 1, 1, 17, 0, NULL, 1, NULL, NULL, NULL, NULL);
87-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (14, '2006-03-22 00:00:00', 1, 1, 5, '2006-03-21 01:00:02', '00:01:30', 1, 1, 28, 0, NULL, 1, NULL, NULL, NULL, NULL);
88-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (15, '2006-03-22 00:00:01', 1, 1, 5, '2006-03-21 01:00:00', '00:01:30', 1, 1, 29, 0, NULL, 1, NULL, NULL, NULL, NULL);
89-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (16, '2005-03-24 00:00:01', 1, 11, 1, '2005-03-25 00:00:02', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
90-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (18, '2004-09-27 11:57:14', 1, 8, 1, '2004-09-27 11:57:13', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
91-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (19, '2005-03-24 00:00:02', 1, 8, 1, '2005-03-25 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL, NULL);
92-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (21, '2006-12-01 00:00:01', 1, 1, 2, NULL, NULL, NULL, NULL, 33, 0, NULL, 1, NULL, NULL, NULL, NULL);
93-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (22, '2007-04-20 00:00:00', 1, 8, 7, '2007-04-20 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 1, NULL, NULL, NULL, 91);
94-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (23, '2006-04-11 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 1, NULL, NULL, NULL, NULL);
95-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (24, '2007-05-30 00:00:00', 1, 1, 2, '2007-05-30 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 11, NULL, NULL, NULL, NULL);
96-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (25, '2007-07-08 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 9, NULL, NULL, NULL, NULL);
97-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (26, '2007-07-08 00:00:00', 1, 8, 2, '2007-07-08 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 9, NULL, NULL, NULL, NULL);
98-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (27, '2007-07-24 00:00:00', 1, 1, 1, '2007-07-24 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 9, NULL, NULL, NULL, NULL);
99-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (28, '2007-08-10 00:00:00', 3, 12, 1, '2007-08-10 00:00:13', '00:00:13', 1, 1, 14, 0, NULL, 9, NULL, NULL, NULL, NULL);
100-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (29, '2007-08-09 21:54:18.553132', 1, 8, 1, '2007-08-09 23:59:59', NULL, NULL, NULL, 36, 0, NULL, 12, NULL, NULL, NULL, NULL);
101-INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, estimated_build_duration, build_warnings, date_first_dispatched, upload_log) VALUES (30, '2007-08-10 00:00:01', 3, 12, 1, '2007-08-10 00:00:14', '00:00:13', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL, NULL);
102+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (2, '2004-09-27 11:57:13', 1, 1, 1, '2004-09-27 11:57:14', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
103+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (6, '2006-12-01 00:00:00', 1, 1, 2, '2006-12-01 00:00:01', '00:00:01', 1, 1, 32, 0, NULL, 1, NULL, NULL, NULL);
104+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (7, '2005-03-24 00:00:00', 1, 6, 1, '2005-03-25 00:00:03', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
105+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (8, '2005-09-30 00:00:00', 1, 6, 6, NULL, NULL, NULL, NULL, 14, 0, NULL, 1, NULL, NULL, NULL);
106+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (9, '2005-10-01 00:00:00', 1, 1, 2, '2005-10-02 00:00:01', '00:03:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
107+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (10, '2006-01-27 00:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 26, 0, NULL, 1, NULL, NULL, NULL);
108+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (11, '2006-02-14 00:00:00', 1, 6, 0, NULL, NULL, NULL, NULL, 25, 0, NULL, 1, NULL, NULL, NULL);
109+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (12, '2006-02-28 00:00:00', 1, 6, 3, '2006-02-28 00:00:01', '00:06:02', 1, 1, 27, 0, 'cpp (>= 4:4.0.1-3), gcc-4.0 (>= 4.0.1-2)', 1, NULL, NULL, NULL);
110+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (13, '2006-03-21 00:00:00', 1, 1, 5, '2006-03-21 01:00:03', '00:01:30', 1, 1, 17, 0, NULL, 1, NULL, NULL, NULL);
111+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (14, '2006-03-22 00:00:00', 1, 1, 5, '2006-03-21 01:00:02', '00:01:30', 1, 1, 28, 0, NULL, 1, NULL, NULL, NULL);
112+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (15, '2006-03-22 00:00:01', 1, 1, 5, '2006-03-21 01:00:00', '00:01:30', 1, 1, 29, 0, NULL, 1, NULL, NULL, NULL);
113+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (16, '2005-03-24 00:00:01', 1, 11, 1, '2005-03-25 00:00:02', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
114+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (18, '2004-09-27 11:57:14', 1, 8, 1, '2004-09-27 11:57:13', '00:02:01', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
115+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (19, '2005-03-24 00:00:02', 1, 8, 1, '2005-03-25 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 1, NULL, NULL, NULL);
116+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (21, '2006-12-01 00:00:01', 1, 1, 2, NULL, NULL, NULL, NULL, 33, 0, NULL, 1, NULL, NULL, NULL);
117+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (22, '2007-04-20 00:00:00', 1, 8, 7, '2007-04-20 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 1, NULL, NULL, 91);
118+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (23, '2006-04-11 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 1, NULL, NULL, NULL);
119+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (24, '2007-05-30 00:00:00', 1, 1, 2, '2007-05-30 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 11, NULL, NULL, NULL);
120+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (25, '2007-07-08 12:00:00', 1, 1, 1, NULL, NULL, NULL, NULL, 35, 0, NULL, 9, NULL, NULL, NULL);
121+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (26, '2007-07-08 00:00:00', 1, 8, 2, '2007-07-08 00:00:01', '00:01:20', 1, 1, 33, 0, NULL, 9, NULL, NULL, NULL);
122+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (27, '2007-07-24 00:00:00', 1, 1, 1, '2007-07-24 00:00:01', '00:01:20', 1, 1, 20, 0, NULL, 9, NULL, NULL, NULL);
123+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (28, '2007-08-10 00:00:00', 3, 12, 1, '2007-08-10 00:00:13', '00:00:13', 1, 1, 14, 0, NULL, 9, NULL, NULL, NULL);
124+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (29, '2007-08-09 21:54:18.553132', 1, 8, 1, '2007-08-09 23:59:59', NULL, NULL, NULL, 36, 0, NULL, 12, NULL, NULL, NULL);
125+INSERT INTO build (id, datecreated, processor, distroarchseries, buildstate, datebuilt, buildduration, buildlog, builder, sourcepackagerelease, pocket, dependencies, archive, build_warnings, date_first_dispatched, upload_log) VALUES (30, '2007-08-10 00:00:01', 3, 12, 1, '2007-08-10 00:00:14', '00:00:13', 1, 1, 14, 0, NULL, 1, NULL, NULL, NULL);
126
127
128 ALTER TABLE build ENABLE TRIGGER ALL;
129@@ -1697,8 +1697,8 @@
130
131 ALTER TABLE buildqueue DISABLE TRIGGER ALL;
132
133-INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type) VALUES (1, 1, 'Dummy sampledata entry, not processing', 1, false, 1, 1);
134-INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type) VALUES (2, NULL, NULL, 10, false, 2, 1);
135+INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type, estimated_duration) VALUES (1, 1, 'Dummy sampledata entry, not processing', 1, false, 1, 1, '00:00:00');
136+INSERT INTO buildqueue (id, builder, logtail, lastscore, manual, job, job_type, estimated_duration) VALUES (2, NULL, NULL, 10, false, 2, 1, '00:01:00');
137
138
139 ALTER TABLE buildqueue ENABLE TRIGGER ALL;
140
141=== modified file 'database/schema/comments.sql'
142--- database/schema/comments.sql 2009-11-16 21:20:36 +0000
143+++ database/schema/comments.sql 2009-11-20 13:57:18 +0000
144@@ -1516,7 +1516,6 @@
145 COMMENT ON COLUMN Build.pocket IS 'Stores the target pocket identifier for this build.';
146 COMMENT ON COLUMN Build.dependencies IS 'Contains a debian-like dependency line specifying the current missing-dependencies for this package.';
147 COMMENT ON COLUMN Build.archive IS 'Targeted archive for this build.';
148-COMMENT ON COLUMN Build.estimated_build_duration IS 'How long does the previous attempt to build this source took in this architecture.';
149 COMMENT ON COLUMN Build.build_warnings IS 'Warnings and diagnosis messages provided by the builder while building this job.';
150 COMMENT ON COLUMN Build.date_first_dispatched IS 'The instant the build was dispatched the first time. This value will not get overridden if the build is retried.';
151 COMMENT ON COLUMN Build.upload_log IS 'Reference to a LibraryFileAlias containing the upload log messages generated while processing the binaries resulted from this build.';
152@@ -1539,6 +1538,7 @@
153 COMMENT ON COLUMN BuildQueue.manual IS 'Indicates if the current record was or not rescored manually, if so it get skipped from the auto-score procedure.';
154 COMMENT ON COLUMN BuildQueue.job IS 'Foreign key to the `Job` table row with the generic job data.';
155 COMMENT ON COLUMN BuildQueue.job_type IS 'Type of job (enumeration value), enables us to find/query the correct table with the data specific to this type of job.';
156+COMMENT ON COLUMN BuildQueue.estimated_duration IS 'Estimated job duration, based on previous running times of comparable jobs.';
157
158 -- Mirrors
159
160
161=== added file 'database/schema/patch-2207-14-0.sql'
162--- database/schema/patch-2207-14-0.sql 1970-01-01 00:00:00 +0000
163+++ database/schema/patch-2207-14-0.sql 2009-11-20 13:57:18 +0000
164@@ -0,0 +1,32 @@
165+-- Copyright 2009 Canonical Ltd. This software is licensed under the
166+-- GNU Affero General Public License version 3 (see the file LICENSE).
167+
168+SET client_min_messages=ERROR;
169+
170+-- The schema patch required for the Soyuz buildd generalisation, see
171+-- https://dev.launchpad.net/Soyuz/Specs/BuilddGeneralisation for details.
172+-- Bug #485524.
173+
174+-- Please note : this change is needed in order to estimate build farm job
175+-- dispatch times irrespective of the job type.
176+
177+-- Step 1
178+-- Add an estimated duration column to the `BuildQueue` table first.
179+ALTER TABLE ONLY buildqueue
180+ADD COLUMN estimated_duration interval NOT NULL DEFAULT '0 sec';
181+
182+-- Step 2
183+-- Migrate the estimated duration values from the `Build` table.
184+UPDATE buildqueue
185+ SET estimated_duration = build.estimated_build_duration
186+ FROM buildpackagejob, build
187+ WHERE
188+ buildqueue.job = buildpackagejob.job
189+ AND buildpackagejob.build = build.id
190+ AND build.estimated_build_duration IS NOT NULL;
191+
192+-- Step 3
193+-- Drop the obsolete 'estimated_build_duration' column from the `Build` table.
194+ALTER TABLE ONLY build DROP COLUMN estimated_build_duration;
195+
196+INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 14, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: