← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/lpbuildbot/fix-force-again into lp:lpbuildbot

 

Colin Watson has proposed merging lp:~cjwatson/lpbuildbot/fix-force-again into lp:lpbuildbot.

Commit message:
Fix forcing builds when there are no relevant schedulers.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lpbuildbot/fix-force-again/+merge/406808

This should fix forcing builds for bionic, I hope.  I don't have a good way to test this at the moment, but it looks roughly right by reference to buildbot's internals.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/lpbuildbot/fix-force-again into lp:lpbuildbot.
=== modified file 'lpbuildbot/web.py'
--- lpbuildbot/web.py	2021-06-11 11:45:36 +0000
+++ lpbuildbot/web.py	2021-08-09 11:10:44 +0000
@@ -96,11 +96,12 @@
                 yield scheduler.scheduleBuild(
                     reason=reason, builderNames=[builder])
         else:
-            ssid = yield master.db.sourcestamps.addSourceStamp(
+            setid = yield self.master.db.sourcestampsets.addSourceStampSet()
+            yield master.db.sourcestamps.addSourceStamp(
                 branch=branch, revision=None, repository=repository,
-                project='')
+                project='', sourcestampsetid=setid)
             yield master.addBuildset(
-                ssid=ssid, reason=reason, properties={},
+                sourcestampsetid=setid, reason=reason, properties={},
                 builderNames=[builder])
         request.write(success_html)
         request.finish()


Follow ups