phase1,phase2: improve round robin builds
authorPetr Štetiar <ynezz@true.cz>
Wed, 21 Jul 2021 19:31:28 +0000 (21:31 +0200)
committerPetr Štetiar <ynezz@true.cz>
Wed, 21 Jul 2021 19:56:13 +0000 (21:56 +0200)
commit87ed6cf749bee5a22ffed22fad248d78a1144352
tree842890ad6fc8ae58a3086b0363bdb3a6b86a1cdc
parentffa094e833733c96f14420c26605f02be7f0fc36
phase1,phase2: improve round robin builds

There seems to be some issue with database updates, where database
updates are asynchronous and thus the status update of the previous
build (complete_at DB column) might take little bit longer, then
preparation of the next/current build.

This is issue during job prioritization as this might result in the
build of the same builder twice in a row, for example:

 2021-06-22 02:42:54+0000 [-]  <Build mipsel_24kc number:95 results:success>: build finished
 2021-06-22 02:42:55+0000 [-] prioritizeBuilders:          mipsel_24kc complete_at: 2021-06-21 20:17:14+00:00
 2021-06-22 03:14:30+0000 [-] prioritizeBuilders:          mipsel_24kc complete_at: 2021-06-22 02:42:54+00:00

Build finishes at 02:42:54, scheduler then asks for next build at
02:42:55, but the build still has the old complete_at timestamp
2021-06-21 20:17:14 instead of the correct one 2021-06-22 02:42:54, thus
scheduling the build of oldest mipsel_24kc builder one more time.

This is so far very promising workaround attempt which checks latest
builder complete_at in builds table which seems to be updated faster,
thus using greater complete_at value seems to work for now.

References: https://github.com/buildbot/buildbot/issues/4592#issuecomment-801163587
Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase1/master.cfg
phase2/master.cfg