← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/build-retry-superseded into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/build-retry-superseded into lp:launchpad.

Commit message:
Make SUPERSEDED builds retriable.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #444030 in Launchpad itself: "Soyuz refuses to build superseded Source which is actually published"
  https://bugs.launchpad.net/launchpad/+bug/444030

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/build-retry-superseded/+merge/270808

Make SUPERSEDED builds retriable.

We've used this on rare occasions in the past to allow builds to permakill builds, but that's much less of an issue nowadays.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/build-retry-superseded into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py	2015-08-27 10:01:41 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py	2015-09-11 12:39:33 +0000
@@ -448,6 +448,7 @@
             BuildStatus.CHROOTWAIT,
             BuildStatus.FAILEDTOUPLOAD,
             BuildStatus.CANCELLED,
+            BuildStatus.SUPERSEDED,
             ]
 
         # If the build is currently in any of the failed states,

=== modified file 'lib/lp/soyuz/tests/test_build.py'
--- lib/lp/soyuz/tests/test_build.py	2015-08-27 10:01:41 +0000
+++ lib/lp/soyuz/tests/test_build.py	2015-09-11 12:39:33 +0000
@@ -218,6 +218,16 @@
         build.updateStatus(BuildStatus.CANCELLED)
         self.assertTrue(build.can_be_retried)
 
+    def test_retry_superseded(self):
+        # A superseded build can be retried
+        spph = self.publisher.getPubSource(
+            sourcename=self.factory.getUniqueString(),
+            version="%s.1" % self.factory.getUniqueInteger(),
+            distroseries=self.distroseries)
+        [build] = spph.createMissingBuilds()
+        build.updateStatus(BuildStatus.SUPERSEDED)
+        self.assertTrue(build.can_be_retried)
+
     def test_uploadlog(self):
         # The upload log can be attached to a build
         spph = self.publisher.getPubSource(


Follow ups