[Buildbot-devel] Thoughts on IRC status delivery
Brian Warner
warner-buildbot at lothar.com
Thu Aug 2 08:45:39 UTC 2007
Stefan Seefeld <seefeld at sympatico.ca> writes:
>> Anyways, feel free to take this idea and run with it. I *might* hack
>> on it at some point, but my feelings won't be hurt if someone beats me
>> to it.
It's interesting how different frontends affect the way we treat different
communication mechanisms. I never used IRC until getting involved with the
#twisted folks, and I always think of it as a room that I'm standing in.
Within this mindset, the buildbot's IRC presence is like a robot in the
corner, and every once in a while somebody thinks to ask it a question.
I didn't start using an IM client until even more recently. I use Gaim (now
called Pidgin) for IM and a separate client (erc-mode for emacs) for IRC, so
in my mind the Gaim window is always associated with a specific person, and
when text appears in it, there is a human at the other end of the wire who
wants my attention. In this mindset, the buildbot could quite reasonably be
extra-chatty, and just spew out event notices as builds happen without making
anyone want to muzzle it.
I have a branch in which the IRC bot command/response code is factored out
into a separate mixin class. The goal is to use the same code for IM status
clients (starting with AIM/toc, since that protocol appears to be implemented
within Twisted, not that I've actually been able to make it work..). The
design calls for a number of "channels", each of which keeps separate state.
In the IRC context, there is one channel for the IRC channel as a whole
(which receives messages whenever someone uses the "buildbot: command"
convention, and broadcasts messages to the whole channel), and another
channel for each person who exchanges private messages with the buildbot
(i.e. /msg buildbot command). In the IM context, there is a separate channel
for each person who interacts with the buildbot account.
Each of these channels will have a flag to say how noisy they are: when turn
on, the IM status plugin will internally subscribe to hear about new builds
and then emit status messages whenever those events occur. There will be
commands to control this flag, like 'buildbot: noisy' and 'buildbot: quiet'.
The IM user can send an introductory message to the buildbot to ask it to
start announcing events. For some protocols, we could probably figure out
some sort of presence-triggered subscriptions, so the buildbot would watch
for you to log in, and start sending you messages as soon as it sees you.
I haven't really looked at it, but the "CIA" bot may be of interest here. It
might be useful to have the buildbot send messages to CIAbot and have it
distribute events too.
cheers,
-Brian
More information about the devel
mailing list