[Buildbot-commits] [Buildbot] #2513: Builder priority sometimes not getting set properly during a reconfigure

Buildbot trac trac at buildbot.net
Sun Jun 23 00:54:32 UTC 2013


#2513: Builder priority sometimes not getting set properly during a reconfigure
--------------------+--------------------
Reporter:  RockHed  |       Owner:
    Type:  defect   |      Status:  new
Priority:  major    |   Milestone:  0.8.+
 Version:  0.8.7p1  |  Resolution:
Keywords:           |
--------------------+--------------------

Comment (by RockHed):

 Not all our builders have the properties set, so here are the priority fns
 that we put in place:
 def getBuilderPriority(builder):
     try:
         return builder.properties.get("priority", 0)
     except Exception as e:
         print builder, e
         return 2 # Lowest priority by default

 def prioritizeBuilders(buildmaster, builders):
     builders.sort(key=getBuilderPriority, reverse=True)
     print "Builder priorities: {0}".format(["{0} priority {1}".format(b,
 getBuilderPriority(b)) for b in builders])
     return builders

 c['prioritizeBuilders'] = prioritizeBuilders

 Without catching the exception, the full stack trace is:
 {{{
 2013-06-22 17:49:00-0700 [-] Unhandled Error
         Traceback (most recent call last):
           File "/Library/Python/2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/process/botmaster.py", line
 385, in maybeStartBuildsOn
             yield self._sortBuilders(list(existing_pending |
 new_builders))
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py",
 line 1187, in unwindGenerator
             return _inlineCallbacks(None, gen, Deferred())
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py",
 line 1045, in _inlineCallbacks
             result = g.send(result)
           File "/Library/Python/2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/process/botmaster.py", line
 444, in _sortBuilders
             builders = yield defer.maybeDeferred(lambda :
         --- <exception caught here> ---
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py",
 line 134, in maybeDeferred
             result = f(*args, **kw)
           File "/Library/Python/2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/process/botmaster.py", line
 445, in <lambda>
             sorter(self.master, builders))
           File "/Users/buildbot/buildmaster/master.cfg", line 158, in
 prioritizeBuilders
             builders.sort(key=getBuilderPriority, reverse=True)
           File "/Users/buildbot/buildmaster/master.cfg", line 152, in
 getBuilderPriority
             return builder.properties.get("priority", 0)
         exceptions.AttributeError: Builder instance has no attribute
 'properties'
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2513#comment:4>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list