Ticket #132 (new enhancement)

Opened 6 years ago

Last modified 4 months ago

Use jinja for MailNotifier emails

Reported by: bhearsum Owned by:
Priority: major Milestone: 0.8.+
Version: Keywords: mail, web, sprint
Cc:

Description

Buildbot logs can be extremely big. For "on-failure" e-mails it would be quite convenient to only send the last N lines of a log, which (hopefully) would include the point of failure.

Attachments

InformativeMailNotifier.py Download (1.4 KB) - added by ddunbar 4 years ago.

Change History

comment:1 Changed 5 years ago by warner

yeah, seems reasonable

comment:2 Changed 4 years ago by dustin

This can be implemented with jgraff's "customMesg" support:

 http://github.com/jgraff/buildbot/commit/28b77b98aec06d7816721e368ea58a5954d2f35d

comment:3 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.+

Changed 4 years ago by ddunbar

comment:4 Changed 4 years ago by ddunbar

FWIW, I attached my implementation of InformativeMailNotifier?, which appends change and log information. I'm not in love with the formatting, but it is better than nothing.

comment:5 Changed 4 years ago by dustin

Thanks! I think that this needs to wait on a better customMesg interface, and some kind of "library" of pre-fabricated customMesg methods.

comment:6 Changed 3 years ago by ddunbar

We have the better customMesg interface, now we just need to figure out the best place to put a more configurable mailer.

comment:7 Changed 3 years ago by marcusl

We could perhaps implement this using jinja templates on that branch (see [JinjaBranch]).

Those templates are quite powerful (should be possible to slice lists, etc, for the log statements), and we could pretty easily add two or three default ones in the code, plus allow the user to send in his own.

comment:8 Changed 3 years ago by dustin

  • Summary changed from make MailNotifier be able to send only the last N lines of a log to Use jinja for MailNotifier emails

comment:9 Changed 3 years ago by dustin

  • Keywords mail, web added

comment:10 Changed 4 months ago by dustin

  • Keywords web, sprint added; web removed
Note: See TracTickets for help on using tickets.