← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/multiproc-builders-db into lp:launchpad/db-devel

 

William Grant has proposed merging lp:~wgrant/launchpad/multiproc-builders-db into lp:launchpad/db-devel with lp:launchpad as a prerequisite.

Commit message:
Add a builderprocessor table to let builders acquire candidates of multiple architectures.

Requested reviews:
  Stuart Bishop (stub): db
Related bugs:
  Bug #285206 in Launchpad itself: "builddmaster needs to be able to deal with buildds that can host builds for more than one arch"
  https://bugs.launchpad.net/launchpad/+bug/285206

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/multiproc-builders-db/+merge/197013

This branch adds a BuilderProcessor table, replacing Builder.processor with a many-to-many relation to handle eg. the PPA i386/amd64/lpia/armel/armhf hybrid builders.
-- 
https://code.launchpad.net/~wgrant/launchpad/multiproc-builders-db/+merge/197013
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'database/sampledata/current-dev.sql'
--- database/sampledata/current-dev.sql	2013-11-28 06:45:20 +0000
+++ database/sampledata/current-dev.sql	2013-11-28 06:45:20 +0000
@@ -3718,6 +3718,15 @@
 ALTER TABLE bugwatchactivity ENABLE TRIGGER ALL;
 
 
+ALTER TABLE builderprocessor DISABLE TRIGGER ALL;
+
+INSERT INTO builderprocessor (builder, processor) VALUES (1, 1);
+INSERT INTO builderprocessor (builder, processor) VALUES (2, 1);
+
+
+ALTER TABLE builderprocessor ENABLE TRIGGER ALL;
+
+
 ALTER TABLE buildpackagejob DISABLE TRIGGER ALL;
 
 INSERT INTO buildpackagejob (id, job, build) VALUES (1, 1, 8);

=== modified file 'database/sampledata/current.sql'
--- database/sampledata/current.sql	2013-11-28 06:45:20 +0000
+++ database/sampledata/current.sql	2013-11-28 06:45:20 +0000
@@ -3652,6 +3652,15 @@
 ALTER TABLE bugwatchactivity ENABLE TRIGGER ALL;
 
 
+ALTER TABLE builderprocessor DISABLE TRIGGER ALL;
+
+INSERT INTO builderprocessor (builder, processor) VALUES (1, 1);
+INSERT INTO builderprocessor (builder, processor) VALUES (2, 1);
+
+
+ALTER TABLE builderprocessor ENABLE TRIGGER ALL;
+
+
 ALTER TABLE buildpackagejob DISABLE TRIGGER ALL;
 
 INSERT INTO buildpackagejob (id, job, build) VALUES (1, 1, 8);

=== added file 'database/schema/patch-2209-52-0.sql'
--- database/schema/patch-2209-52-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-52-0.sql	2013-11-28 06:45:20 +0000
@@ -0,0 +1,18 @@
+-- Copyright 2013 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE builder ALTER COLUMN processor DROP NOT NULL;
+
+CREATE TABLE builderprocessor (
+    builder integer NOT NULL REFERENCES builder,
+    processor integer NOT NULL REFERENCES processor,
+    PRIMARY KEY (builder, processor)
+);
+CREATE INDEX builderprocessor__processor__idx ON builderprocessor(processor);
+
+INSERT INTO builderprocessor (builder, processor)
+    SELECT id, processor FROM builder;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 52, 0);


Follow ups