Opened 3 years ago

#3379 new defect

Buildbot priority not getting honored?

Reported by: RockHed Owned by:
Priority: major Milestone: undecided
Version: 0.8.12 Keywords: priority
Cc:

Description

I have several "restore" factories (call Restore Next, Restore Next2, Restore Main etc), all priority 2. I have a "Setup" factory, priority 1, and "Tests" factory, priority 1. Each restore triggers the setup factory as the last step.

I am seeing that when "RestoreMain?" is running, and "Restore Next2" gets triggered, when the running factory stops and the next one is scheduled, it goes into another restore (the one that got triggered by a notification, in the middle of one restore), instead of going to the higher priority setup. I am not sure if this is a configuration issue where the priority is not taking affect.

2015-10-29 08:34:03-0700 [-]  step 'trigger' complete: success
2015-10-29 08:34:03-0700 [-]  <Build Restore Main mybot1>: build finished
2015-10-29 08:34:03-0700 [-]  setting expectations for next time
2015-10-29 08:34:03-0700 [-] new expectations: 2389.79257941 seconds
2015-10-29 08:34:03-0700 [-] releaseLocks(<BuildSlave 'mybot1'>): []
2015-10-29 08:34:03-0700 [-] added buildset 1196391 to database
2015-10-29 08:34:03-0700 [-] starting build <Build Restore Next2 mybot1> using slave <SlaveBuilder builder='Restore Next2 mybot1' slave='mybot1'>

Prioritize function in master.cfg:

def getBuilderPriority(builder):
  try:
    return builder.config.properties.get("priority", 2)
  except Exception as e:
    print builder, e
    return 3 # Lowest priority by default, but we shouldn't get here

def prioritizeBuilders(buildmaster, builders):
  builders.sort(key=getBuilderPriority, reverse=False)
  return builders

c['prioritizeBuilders'] = prioritizeBuilders

Change History (0)

Note: See TracTickets for help on using tickets.