← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rockstar/launchpad/build-farm-job-constraint into lp:launchpad

 

Paul Hummer has proposed merging lp:~rockstar/launchpad/build-farm-job-constraint into lp:launchpad.

Requested reviews:
  Robert Collins (lifeless): db
  Stuart Bishop (stub): db
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #628427 oops on /builders - LocationError(SourcePackageRecipeBuildJob, 'build') - BuilderSet:+index
  https://bugs.launchpad.net/bugs/628427


This branch doesn't actually FIX bug #628427, but it fixes an issue there so that the next time the bug rears its ugly head, it rears it as a database integrity issue instead of waiting for a read to happen.

Basically, the interface and database model said sourcepackage_recipe_build couldn't be NULL, but the database was quite fine with it.

Aaron and I suspect the bug originally was because someone was futzing with the database.  I've had the LOSAs run the query to make sure that this patch will apply (making sure there aren't any SourcePackageRecipeBuildJob rows with a NULL sourcepackage_recipe_build).
-- 
https://code.launchpad.net/~rockstar/launchpad/build-farm-job-constraint/+merge/36219
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rockstar/launchpad/build-farm-job-constraint into lp:launchpad.
=== added file 'database/schema/patch-2208-99-0.sql'
--- database/schema/patch-2208-99-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-99-0.sql	2010-09-21 21:39:48 +0000
@@ -0,0 +1,8 @@
+-- Copyright 2010 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 SourcePackageRecipeBuildJob
+    ALTER COLUMN sourcepackage_recipe_build SET NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0);


Follow ups