[Buildbot-devel] Request for assistance: IRC bot

Brad Hards bradh at frogmouth.net
Tue Oct 25 10:00:01 UTC 2005


On Monday 24 October 2005 15:40 pm, Brian Warner wrote:
> I've got a couple. The first is that the subscribe/unsubscribe should
> probably be done in startService/stopService rather than
> setServiceParent/disown. The start/stop methods will be called after/before
> the set/disown pair, respectively (i.e. "inside" them), and the service
> parent will be available in 'self.parent'. In general, you want to make
> sure your own service is running before you give anyone else the ability to
> start sending you events.
I didn't manage to get this bit done. I just don't understand what parts 
should go into which method.

> The next level of the hierarchy is the Build, with events like buildStarted
> and buildFinished. To receive these, you must subscribe to each Builder
> separately, by asking the IBuilderStatus. This allows a StatusReceiver to
> pay attention to Builds of some Builders while ignoring those of others.
> IBuilderStatus.subscribe sets you up to receive builderChangedState,
> buildStarted, and buildFinished events for just that one Builder.
Yep, got that  now (and had it, no idea why I deleted it). 

> Other notes:
>
>  build.getETA() returns the number of seconds from now that the build is
>  expected to finish in.. you might want to reformat this as HH:MM:SS or
> maybe even absolute time
I re-used a convenient routine that was already there which did relative time. 
Absolute isn't so good, when there is no particular time zone which is 
meaningful.

>  build.getSourceStamp() might probably change in the future (to return an
>  actual SourceStamp instance, or something). Use it for now, it is the only
>  interface you've got, but keep an eye on the release notes for future
>  versions in case it changes.
It tends not (at least in my installation) to return anything meaningful, but 
I kept it anyway.

>  0.7.0 features the new IStatus.getURLForThing() method, which will give
Using that now.

> BTW, this is the sort of thing I'd love to have in the trunk, once it
> acquires some knobs (like a way to enable/disable it from the config file,
> and an IRC-side command like "buildbot: shut up").
Done.  See attached patch.

This does include documentation updates, but the unit tests for IRC fail for 
reasons I don't understand. 

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildbot-irc-2005-10-25.patch
Type: text/x-diff
Size: 16774 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20051025/47afe804/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20051025/47afe804/attachment-0001.bin>


More information about the devel mailing list