Ticket #2266 (closed defect: fixed)
No longer get emails if build ends with Exception
| Reported by: | jaredgrubb | Owned by: | jaredgrubb |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.7 |
| Version: | 0.8.6p1 | Keywords: | |
| Cc: |
Description
After updating to 0.8.6 / 0.8.6p1, I have noticed that I never get emails if the build ends with Exception. The last "Exception" email I got was on March 1,
For example, a successful build ends with the following log:
2012-03-31 13:34:42-0700 [-] step 'Foo' complete: success 2012-03-31 13:34:42-0700 [-] <Build Bar>: build finished 2012-03-31 13:34:42-0700 [-] sending mail (6944 bytes) to ['somewhere@gmail.com'] 2012-03-31 13:34:42-0700 [-] Starting factory <twisted.mail.smtp.ESMTPSenderFactory instance at 0x10fa18cf8> 2012-03-31 13:34:42-0700 [-] setting expectations for next time 2012-03-31 13:34:42-0700 [-] new expectations: 263.892459631 seconds 2012-03-31 13:34:42-0700 [-] releaseLocks(<BuildSlave 'slave'>): [] 2012-03-31 13:34:42-0700 [-] releaseLocks(<Build Bar>): [(<SlaveLock(foo, 1)[slave] 4540846592>, <buildbot.locks.LockAccess instance at 0x10d93b440>)] 2012-03-31 13:34:42-0700 [ESMTPSender,client] Stopping factory <twisted.mail.smtp.ESMTPSenderFactory instance at 0x10fa18cf8>
but if, for example, I do a stop-build from the web:
2012-03-31 13:27:32-0700 [HTTPChannel,2,xxx] web stopBuild of build Foo:35 2012-03-31 13:27:32-0700 [HTTPChannel,2,xxx] <Build Foo>: stopping build: The web-page 'stop build' button was pressed by '<unknown>': 2012-03-31 13:27:32-0700 [HTTPChannel,2,xxx] addCompleteLog(interrupt) 2012-03-31 13:27:32-0700 [HTTPChannel,2,xxx] RemoteCommand.interrupt <RemoteShellCommand '['...]'> The web-page 'stop build' button was pressed by '<unknown>': 2012-03-31 13:27:32-0700 [Broker,0,127.0.0.1] <RemoteShellCommand '['...']'> rc=-12012-03-31 13:27:32-0700 [-] closing log <buildbot.status.logfile.LogFile instance at 0x11235acf8> 2012-03-31 13:27:33-0700 [-] addCompleteLog(warnings (4)) 2012-03-31 13:27:33-0700 [-] releaseLocks(<buildbot.steps.shell.Compile instance at 0x110b23b90>): [] 2012-03-31 13:27:33-0700 [-] step 'Foo' complete: exception 2012-03-31 13:27:33-0700 [-] <Build Bar>: build finished 2012-03-31 13:27:34-0700 [-] releaseLocks(<BuildSlave 'slave'>): [] 2012-03-31 13:27:34-0700 [-] releaseLocks(<Build Bar>): [(<SlaveLock(foo, 1)[slave] 4572719224>, <buildbot.locks.LockAccess instance at 0x10fe3ca28>)]
In the good case, immediately after "build finished", you get a "sending mail" line, a factory call to ESMTPSenderFactory, and then the locks are released. In the bad case, immediately after "build finished", it goes straight to releasing the locks, skipping the email step.
My status config looks like this:
mail.MailNotifier(
fromaddr=EMAIL_CONFIG['from_address'],
builders=[
'Bar',
],
extraRecipients=EMAIL_CONFIG['all_addresses'],
sendToInterestedUsers=EMAIL_CONFIG['sendToInterestedUsers'],
relayhost="xxx",
mode='all',
lookup=Xxx(),
messageFormatter=FormatBuildResults()
),
mail.MailNotifier(
fromaddr=EMAIL_CONFIG['from_address'],
builders=[
'Bar',
],
extraRecipients=EMAIL_CONFIG['fail_addresses'],
sendToInterestedUsers=False, # these users will get email due to the 'all' one above
relayhost="xxx",
mode='failing',
messageFormatter=FormatBuildResults()
),
Change History
comment:1 Changed 14 months ago by jaredgrubb
- Owner set to jaredgrubb
- Status changed from new to assigned
comment:3 Changed 13 months ago by Jared Grubb
- Status changed from assigned to closed
- Resolution set to fixed
Fixes #2266: Add new 'exception' mode for MailNotifier?
Changeset: e844003796cebc697cfd31bf37ee856df68cd02a
comment:4 Changed 13 months ago by Dustin J. Mitchell
Merge branch 'mail-on-exception' of git://github.com/jaredgrubb/buildbot
- 'mail-on-exception' of git://github.com/jaredgrubb/buildbot: Add docs for the 'exception' and 'all' mail modes Fixes #2266: Add new 'exception' mode for MailNotifier? Changeset: a2d66e2152c749335bd788dc366a1ce5c845905e
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Tom pointed out the change that caused this (6d4367c807302f359eb9eb580c48233ef7e90fd9).
Basically, EXCEPTION results are being skipped now by all MailNotifier? mode's. His suggestion was to add a new mode, "exception", since an EXCEPTION really isnt something that should be factored into a "failing", "warnings", or "change" mode. We'll also map "all" to include this new type.
I'll prepare a patch for this.