Opened 11 years ago

Last modified 4 years ago

#132 new enhancement

Use jinja for MailNotifier emails

Reported by: bhearsum Owned by:
Priority: major Milestone: 0.9.+
Version: Keywords: mail, 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 (1)

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

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by warner

yeah, seems reasonable

comment:2 Changed 10 years ago by dustin

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

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

comment:3 Changed 10 years ago by dustin

  • Milestone changed from undecided to 0.7.+

Changed 9 years ago by ddunbar

comment:4 Changed 9 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 9 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 9 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 9 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 8 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 8 years ago by dustin

  • Keywords mail web added

comment:10 Changed 6 years ago by dustin

  • Keywords sprint added

comment:11 Changed 4 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

comment:12 Changed 4 years ago by sa2ajj

  • Keywords web removed

(I am not sure why web keyword is used here)

Note: See TracTickets for help on using tickets.