Ticket #171 (closed enhancement: fixed)
Notify build events
| Reported by: | nhemingway | Owned by: | nhemingway |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7.8 |
| Version: | 0.7.6 | Keywords: | |
| Cc: | amveer, TTimo, nhemingway, dustin |
Description
The IRC daemon should be able to notify clients of build events. Ideally, it should be able to discriminate between (and notify about) the following build events:
- starting
- finishing
- succeeding
- failing
- encountering an exception
- transitioning from success to failure (the previous build for this branch succeeded, but this one failed)
- transitioning from failure to success
Attachments
Change History
comment:2 Changed 5 years ago by avmeer
Updated a unified diff patch to the CVS trunk as of 2008-01-30.
comment:3 Changed 5 years ago by TTimo
patch applies ok to 0.7.7, but line 297 of words.py: r += "%d" % change.revision throws an exception for me, I changed it to: r += repr( change.revision ) (which seems to be None on my systems)
wishlist:
- save settings between restarts
- identify state changes rather than repeated 'failed' or 'success'
- better status messaging, or customizable somehow. My pref:
SUCCESS: <builder name> FAILURE: <builder name> START : <builder name> etc.
comment:4 Changed 5 years ago by dustin
- Cc amveer, TTimo, nhemingway, dustin added
I don't use the IRC module, so I don't have a good way to judge whether this is acceptable just yet. It has all of the principal components: code, tests, and docs. TTimo, your wishlist items all seem like they could be addressed by subsequent patches, right?
Your repr() change is correct -- change.revision can be None or a string, and should not be an integer.
Let me know if you think this should or should not go into the development branch, and I'll act accordingly.
comment:6 Changed 5 years ago by dustin
Hmm, one problem -- I have twisted.words 0.5.0 installed, yet I get
File "/home/dev/devel/projects/buildbot/t/dustin/buildbot/test/test_status.py", line 1041, in ?
class MyContact(words.Contact):
exceptions.AttributeError: 'module' object has no attribute 'Contact'
Any idea what that is/should be?? I don't see that symbol here: http://twistedmatrix.com/documents/current/api/twisted.words.html
comment:7 Changed 5 years ago by nhemingway
hmm. I think I see the problem. In my (local) copy of buildbot/test/test_status.py and irc.patch, there was a change to additionally import "words" from buildbot.status. In irc-notify.patch, that seems to have been replaced by an import of words from twisted. I haven't had chance to compare the two patches for other differences, but that would seem to be the cause of dustin's issue. Was there an issue with the original irc-notify.patch that caused irc.patch to be created? Did I upload the wrong format? What should I do differently?
I'll incorporate TTimo's comment about repr into my copy and upload a new copy (in whatever format people deem to be correct)
I think TTimo's idea of customizability is probably the way forward and I think I know how to achieve notification of state changes (rather than repeated fails), but I'd like to get the basic logic in place first and treat those later.
As far as saving state between restarts, I've not dug into buildbot's twisted infrastructure yet to have any clue how to go about that - patches or hints welcome.
comment:8 Changed 5 years ago by nhemingway
Scanning the two patches, the only other difference seems to be that irc-notify.patch has added the second clause to the condition at line 714 of buildbot/status/words.py:
if message.startswith("%s:" % self.nickname) or message.startswith("%s," % self.nickname):
comment:9 Changed 5 years ago by dustin
So it sounds like you have a few tweaks you want to make, followed by a new patch? If so, please post it. You're right to use the darcs diff format, as it preserves your patch title and comments (which will eventually make it into the ChangeLog?).
Changed 5 years ago by nhemingway
-
attachment
buildbot_irc.diff
added
replacement unified diff (implements state change notification, the repr change and the second clause of the condition)
comment:10 Changed 5 years ago by slinkp
I'm running that last patch against the 0.7.7 source, seems to work nicely - thanks for this!
comment:11 Changed 5 years ago by dustin
in the dev tree as #171:buildbot_irc.patch.
comment:12 Changed 5 years ago by dustin
- Status changed from assigned to closed
- Resolution set to fixed
pushed to brian's tree
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)