[Buildbot-devel] upgrade from 0.7.1 to 0.8.1. Troubles with schedulers
Boris Savelev
boris.savelev at gmail.com
Mon Aug 2 07:25:57 UTC 2010
Hello!
I use buildbot in my company. While upgrading I get some trouble with
0.8.1. Actualy 2 troubles-) And both with schedulers.
First trouble I describe in http://buildbot.net/trac/ticket/941
I try to force builder remotly -- via pb:
...
remote.callRemote("requestBuild", "builder")
...
but I get exception:
Unhandled error in Deferred:
Traceback from remote host -- Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/spread/banana.py",
line 146, in gotItem
self.callExpressionReceived(item)
File "/usr/lib/python2.5/site-packages/twisted/spread/banana.py",
line 111, in callExpressionReceived
self.expressionReceived(obj)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line
526, in expressionReceived
method(*sexp[1:])
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line
837, in proto_message
self._recvMessage(self.localObjectForID, requestID, objectID,
message, answerRequired, netArgs, netKw)
--- <exception caught here> ---
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line
851, in _recvMessage
netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line
236, in perspectiveMessageReceived
method = getattr(self, "perspective_%s" % message)
exceptions.AttributeError: DebugPerspective instance has no attribute
'perspective_requestBuild'
Also I see that exception and when try launch builder via debugclient.
Is this a bug?
Second:
I have my own periodic scheduler, that get task from DB via django.
It look like that:
{{{
import buildbot.schedulers
class Taskman(buildbot.schedulers.timed.Periodic):
import buildbot.process.properties
def run(self):
import datetime
import cis_django.taskman.models
for task in
cis_django.taskman.models.TaskInstance.objects.filter(accepted__isnull
= True):
task.accepted = datetime.datetime.now()
task.save()
self.builderNames = [b.fullname() for b in
task.task.builder.all()]
properties = {
'task': task.buildnumber,
'taskdesc': task.description,
'forgetsource': task.forgetSource,
'user': task.user.username,
}
self.properties = buildbot.process.properties.Properties()
self.properties.update(properties, "Scheduler")
self.properties.setProperty("scheduler", self.name, "Scheduler")
buildbot.schedulers.timed.Periodic.run(self)
}}}
and registered in configuration:
c['schedulers'].append(hacks.Taskman(name = 'task manager',
builderNames=[], periodicBuildTimer = 60))
With 0.7.12 this works perfectly, scheduler run every minute and start
builders if needed, but with 0.8.1 builders starts time-to-time, not
always. When builder didn't start in waterfall builder have status
"waiting <1 min." but nothing happens and after hour. I think that
periodic scheduler in 0.8.1 depends on changes that buildbot
received, because when I send fakeChange, scheduler and builder wake
up.
--
Boris
More information about the devel
mailing list