Re: [yocto-autobuilder2][PATCH] subtract builder weight instead of add

Richard Purdie

On Fri, 2021-10-29 at 11:39 -0400, Trevor Gamblin wrote:
Signed-off-by: Trevor Gamblin <trevor.gamblin@...>
--- | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ b/
index f94d1dd..fc92e36 100644
--- a/
+++ b/
@@ -168,7 +168,7 @@ def prioritizeBuilders(master, builders):
time = max_time
if in builder_bonuses:
- time = time + builder_bonuses[]
+ time = time - builder_bonuses[]
defer.returnValue((time, bldr))

transformed = yield defer.gatherResults(
This didn't work (and wasn't merged) although I still think it is probably the
correct thing to do with that code.

I did some digging and the issue is that when we trigger builds, it triggers
them one at a time as part of a buildSet and the prioritisation function
therefore sees each build by itself and therefore gives it priority.

That raises the question of the order the triggers are run in. A list of builder
names is passed which is translated to a list of builderids. I think the order
is therefore determined by the database ID of the builders. I did wonder if
sorting the builders list would help but it does not.

There is code in schedulers/ which does:

builderids = list()
for bldr in (yield'builders', ))):
if bldr['name'] in builderNames:

which I think is where the sorting comes from.

I think we're going to have discuss this with upstream.



Join to automatically receive all group messages.