llvm/llvm-zorg

Buildbot could run builds on a single worker in order different to the order of commits

gkistanova opened this issue · 1 comments

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