Opened 5 years ago

Last modified 4 years ago

#3417 new undecided

More than one (ghost) buildrequest if using multiple source steps

Reported by: riziero Owned by:
Priority: major Milestone: 0.9.5
Version: 0.9.0b4 Keywords:
Cc:

Description

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@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@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.

Change History (5)

comment:1 Changed 5 years ago by dustin

  • Milestone changed from 0.9.0 to 0.9.1

comment:2 Changed 4 years ago by tardyp

  • Milestone changed from 0.9.1 to 0.9.2

Ticket retargeted after milestone closed

comment:3 Changed 4 years ago by tardyp

  • Milestone changed from 0.9.2 to 0.9.3

Ticket retargeted after milestone closed

comment:4 Changed 4 years ago by tardyp

  • Milestone changed from 0.9.3 to 0.9.4

Ticket retargeted after milestone closed

comment:5 Changed 4 years ago by tardyp

  • Milestone changed from 0.9.4 to 0.9.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.