Buildbot could run builds on a single worker in order different to the order of commits
gkistanova opened this issue · 1 comments
Here is the example of such case. The order of these two builds should be the other way around:
https://lab.llvm.org/buildbot/#/builders/56/builds/1451
https://lab.llvm.org/buildbot/#/builders/56/builds/1452
Originally reported by @nikic - https://discourse.llvm.org/t/buildbot-started-commenting-prs-on-buid-failures/79738/13
The gitpoller added changes and triggers the changes new
event. The change
record contains the correct timestamp in when_timestamp
but it is not used anywhere. A scheduler calls addBuildsetForChanges() and finally addBuildset() in buildbot/master/buildbot/data/buildsets.py uses the current time for submitted_at
. A lot of buildrequests may be added with the same submitted_at
. It would be great to use when_timestamp
as submitted_at
.
BuildChooserBase._fetchUnclaimedBrdicts() sorts brdicts by submitted_at
and the order is undefined in case of the same submitted_at
for few buildrequest.
The BuildChooserBase sorts by buildrequestid
instead of submitted_at
since v3.10.0.
It seems it is necessary to update the buildbot to v3.10.0 at least or apply the patch
buildbot/buildbot@9b84a03