[Buildbot-commits] [Buildbot] #2266: No longer get emails if build ends with Exception

Buildbot nobody at buildbot.net
Sat Mar 31 20:47:18 UTC 2012


#2266: No longer get emails if build ends with Exception
-----------------------+-----------------------
Reporter:  jaredgrubb  |      Owner:
    Type:  defect      |     Status:  new
Priority:  major       |  Milestone:  undecided
 Version:  0.8.6p1     |   Keywords:
-----------------------+-----------------------
 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 at 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()
     ),
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2266>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list