[Buildbot-devel] Notifying users of events (#75 and #171)

Neil Hemingway neil.hemingway at googlemail.com
Sat Apr 26 12:29:11 UTC 2008

Following on from Brian's email commentary on #75, I'm interested in having
buildbot be able to notify users of build events via various merchanisms.
At the moment, I believe buildbot can only notify via email or IRC and each
watches for event independently.  I think it makes sense to separate the
event monitoring from the notification mechanism.  Some of this will require
implementing some of the infrastructure needed for #75 (although not all the

My plan would be to create the following classes (as mentioned in Brian's

   - EventManager - responsible for monitoring builds, identifying events
   and notifying interesting ones to users.  An event is one of the build
   events listed in #171.  This is not the same as the ProblemManager (as
   mentioned in Brian's email), but it's a start.  The EventManager would be
   configured as c['event_manager'].  Config options would include which build
   events to send notifications about.  To notify users, the EventManager
   - UserManager - responsible for knowing how to contact users when
   asked to.  It would be configured using c['user_manager'].
   - Once this is done, IRC and mailNotifier (et al) wouldn't be status
   plugins, they'd be notification mechanisms (or clone the necessary parts
   from them to create new notification mechanism classes), so maybe we need
   c['notification_routes'] ?

One element of Brian's email I do not anticipate creating is the
ProblemManager.  Maybe when this is created, the EventManager could notify
the ProblemManager of events.  Then buildbot could be configured to notify
about events and/or problems.  Then again, maybe it would be pointless
notifying about events if we notify about problems?

I think this leaves two questions:

   1. How the UserManager is taught about the relationship between a user
   and their contact details (i.e. user "xyz" in the monitored changesource is
   "nick" on IrcStatus channel "#buildbot" and "my.user at my.address.com").
   For my purposes, this could simply be static config for c['user_manager'] as
   we have only internal users.  I am aware that this is unlikely to satisfy
   many other buildbot users, but it should get it off the ground.
    2. The strategy used by the UserManager to decide how to contact the
   user.  I'll start with only IRC, leaving this being nothing more than pass
   through, but it creates a place to implement the algorithm once other
   protocols are supported.

This does, of course, leave the inevitable question of stuff I've missed,
but I'm sure I'll find that out as I go through ;-)

I know some of this doesn't sound like much of a step forward, but it
separates the various different aspects of what notification can/should do
and will hopefully put in place the platform for the other protocols.

Can anyone see any glaring issues with what I've described.  Am I barking up
the wrong tree, or overengineering anything?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20080426/f189632e/attachment.html>

More information about the devel mailing list