[Buildbot] #3532: Inconsistence in foreign key makes changes related schedulers not firing

Buildbot trac trac at buildbot.net
Wed Apr 20 18:41:39 UTC 2016


#3532: Inconsistence in foreign key makes changes related schedulers not firing
---------------------+-------------------
Reporter:  gracinet  |      Owner:
    Type:  defect    |     Status:  new
Priority:  major     |  Milestone:  0.9.0
 Version:  0.9.0b7   |   Keywords:
---------------------+-------------------
 Main symptom: only some of the `SingleBranchScheduler` and other
 changesources oriented schedulers actually launch builds.

 The reason is that at some point, once the change has been analysed and
 categorized as "important", this information gets stored in the
 `scheduler_changes` table to serve as a basis to launch the builds.
 This table as a column `schedulerid`, but the code actually uses the
 `objectid` attribute, that is the id of the scheduler in the `objects`
 table, not the one in `schedulers` table.

 As a result, those schedulers whose id in the `objects` table is not an
 existing id of the `schedulers` table aren't able to launch any build,
 because the line in `scheduler_changes` cannot be written (this should
 probably be more evident in buildbot logs).

 Given that the code is completely consistent on this, I see two possible
 ways of fixing this:

 1. make it official that the `schedulerid` column of the
 `scheduler_changes` table is a reference to the `objects` table, i.e.,
 change foreign key definition
 2. have the code reading and writing to that table actually use the id
 from the `schedulers` table

 If I understand correctly, the `objects` table is meant to be referenced
 from the `object_state` table (somewhat unstructured state data) and 2.
 should be the preferred solution, although it entails more changes to the
 code.

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


More information about the bugs mailing list