[Buildbot-devel] master status
Kreinick, Michael H.
michael.kreinick at gs.com
Sat Jul 9 04:07:28 UTC 2005
Try running buildbot with no arguments. It has interfaces to launch/run the
send change client, the debug client, the TextClient that you're looking at,
and the GTK client. The last two use the PBListener perspective. I can't
remember where I learned about all that, but it is available if you just
type buildbot with no arguments.
Also, builders have a periodicBuildTime argument. Right now I cannot
remember whether it's documented.
I don't think you want to do your XML service thing as a remote status
client. I think you want to write your own IStatusReceiver. Only the HTML
(waterfall) target uses this, but you can too: override setServiceParent
just like the waterfall does, and then use the Icontrol object to get
information about whatever you want. From the Icontrol you can walk pretty
much the whole BB object model and do whatever you want (see
buildbot.interfaces). You should be able to avoid doing any caching or,
really, any serious work in your code. Doing it in-process means you can
also avoid the hassle of worrying about losing your connection to the
master.
I learned this stuff writing the dependency implementation I haven't
bothered to get permission to contribute yet.
Hope that helps,
Michael
-----Original Message-----
From: buildbot-devel-admin at lists.sourceforge.net
[mailto:buildbot-devel-admin at lists.sourceforge.net] On Behalf Of Nick Trout
Sent: Friday, July 08, 2005 11:13 PM
To: buildbot-devel at lists.sourceforge.net
Subject: RE: [Buildbot-devel] master status
I've had a rethink and it looks like I can use buildbot.status.client
and buildbot.clients.base.TextClient to do what I want. Just out of
interest, when do you use the client stuff for? Is the GTK client no
longer used, deprecated in favour of the waterfall?
There seems to be some interesting stuff in clients for development and
debugging. Some documentation here might help other developers get the
hang of setting up and debugging configs faster. E.g. it looks like
buildbot.clients.send is used to ping the master and tell it about a
false change to kick of a build. This would be pretty handy when you a
starting from scratch. I first had to touch files and check them in to
test BB to test sources and kick off builds. Now I've got a fake change
timer (see code below), but it looks like that step creator a better
solution.
I don't think BB is that hard to set up but if this code does what I
think it's supposed to do it would be handy to advertise it more because
it would definitely simplify setting up BB.
Nick
P.S. Just a small thing, at the bottom of buildbot. "master" is missing
as an argument in the test: c = TextClient(master)
<<<<
# put this in master config to help debug setup
from buildbot import util
from buildbot.changes import base, changes
from twisted.internet.task import LoopingCall
class FakeChange(base.ChangeSource, util.ComparableMixin):
"""This source will poll a perforce repository for changes and
submit
them to the change master."""
compare_attrs = ["delay",]
parent = None # filled in when we're added
last_change = None
loop = None
volatile = ['loop']
def __init__(self, delay):
self.delay = delay
def startService(self):
self.loop = LoopingCall(self.check)
self.loop.start(self.delay)
base.ChangeSource.startService(self)
def stopService(self):
self.loop.stop()
return base.ChangeSource.stopService(self)
def check(self):
c = changes.Change('Nick', ['z:/temp/something.txt',], "yeah",
revision=1)
self.parent.addChange(c)
>>>>
> -----Original Message-----
> From: buildbot-devel-admin at lists.sourceforge.net
[mailto:buildbot-devel-
> admin at lists.sourceforge.net] On Behalf Of Nick Trout
> Sent: Thursday, July 07, 2005 3:49 PM
> To: buildbot-devel at lists.sourceforge.net
> Subject: [Buildbot-devel] master status
>
>
> I'd like to create a service which I can query about the current
master
> status. I'd like the service to tell a client when something happens
to
> the build. I'd also like to be able to query the status service about
> the current build status. I was thinking of using XMLRPC to connect to
> the service so that a client can receive build status changes, or to
> retrieve status information from the status service.
>
> I'm looking at the BB code and there seem to be a number of different
> ways to go about this. I suppose the intended method would be
something
> like: create a status service in BB/status which is a StatusReceiver
to
> get updates which you pass on, and then cache information here to
supply
> information when we have a query. It seems a bit redundant
> caching/duplicating information here so there may be a better way to
do
> this.
>
> Do you have any tips about what would be the best way to approach
this?
> How should this be written so as to be easy to maintain in BB (and fit
> with any of the current changes etc)?
>
> Thanks,
> Nick
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar
> happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in
dual
> core and dual graphics technology at this free one hour event hosted
by
> HP,
> AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Buildbot-devel mailing list
Buildbot-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/buildbot-devel
More information about the devel
mailing list