[Buildbot] #3417: More than one (ghost) buildrequest if using multiple source steps

Buildbot trac trac at buildbot.net
Fri Jan 22 11:15:33 UTC 2016


#3417: More than one (ghost) buildrequest if using multiple source steps
----------------------+-------------------
Reporter:  riziero    |      Owner:
    Type:  undecided  |     Status:  new
Priority:  major      |  Milestone:  0.9.0
 Version:  0.9.0b4    |   Keywords:
----------------------+-------------------
 There's a long thread mainly involving me and Tardy. I'll sum it up as
 best as I can.

 My orginal question was:

 "Is it possible that wehn calling addBuildsetForSourceStamps with 2
 sourcestamps, buildbot will create 2 buildrequests and then only collapse
 them when one of the 2 kicks in? Those 2 buildrequests in fact show up as
 2 distinct ones in the web ui until the build starts. When it does only
 one will remain."

 After kicking one single build, Rest says:


 {{{
 {
   "buildrequests": [
     {
       "builderid": 4,
       "buildrequestid": 1,
       "buildsetid": 1,
       "claimed": true,
       "claimed_at": 1447860725,
       "claimed_by_masterid": 1,
       "complete": true,
       "complete_at": 1447860727,
       "priority": 0,
       "results": 2,
       "submitted_at": 1447860725,
       "waited_for": false
     },
     {
       "builderid": 4,
       "buildrequestid": 1,
       "buildsetid": 1,
       "claimed": true,
       "claimed_at": 1447860725,
       "claimed_by_masterid": 1,
       "complete": true,
       "complete_at": 1447860727,
       "priority": 0,
       "results": 2,
       "submitted_at": 1447860725,
       "waited_for": false
     }
   ],
   "meta": {
     "total": 2
   }
 }
 }}}


 which are perfectly equal. Also notice that only one buildrequest seems to
 exist in the db (as Tardy pointed out there's infact a unique constraint
 on buildrequestid), still Rest says 2


 {{{
 buildbot at 3d9b217df954:~$ sqlite3 state.sqlite .dump |grep -i insert | grep
 buildrequest
 INSERT INTO "buildrequests" VALUES(1,1,5,0,0,-1,1447950188,NULL,0);
 INSERT INTO "buildrequest_claims" VALUES(1,1,1447950188);
 buildbot at 3d9b217df954:~$
 }}}



 This also seems to happen when a build is kicked off by p4poller, not only
 when it's being kicked by my custom scheduler calling
 addBuildsetForSourceStamps. As result of this I am also getting
 notification emails with duplicated content.

--
Ticket URL: <http://trac.buildbot.net/ticket/3417>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list