Opened 5 years ago

Last modified 4 years ago

#2510 new enhancement

Better support for filtering mail notification messages?

Reported by: juj Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.7p1 Keywords: mail
Cc:

Description (last modified by dustin)

My current mail notification setup is as follows:

from buildbot.status.mail import MailNotifier
mn = MailNotifier(fromaddr="buildresults@buildserver.com", mode=('problem','change',), extraRecipients=['admin@buildserver.com'])
c['status'].append(mn)

It results in following messages being sent:

Title: buildbot exception in <repo> on <builder>
Content: BUILD FAILED: exception interrupted

(sent when user manually stopped the build)

Title: buildbot success in <repo> on <builder>
Content: Build succeeded!

(sent after the build succeeds and previous build was 1) manually stopped, 2) failed on network exception 3) finished in failure)

Title: buildbot failure in <repo> on <builder>
Content: BUILD FAILED: failed

(sent after the build finishes in failure and the previous build was 1) manually stopped, 2) failed on network exception 3) finished in success)

Title: buildbot retry in <repo> on <builder>
Content: BUILD FAILED: retry exception slave lost

sent after the slave drops from the network.

I would like to hide all retry messages from being sent (no matter what the previous state was), and hide all exception messages (no matter what the previous state was), and I would like neither 'exception slave lost' or 'exception interrupted' to alter the current state of the builder so that the next failure/success wouldn't be triggered as a status change and cause another message. E.g. I see message chains like

SUCCESS -> SLAVE LOST -> SUCCCESS or
SUCCESS -> MANUALLY ABORTED -> SUCCESS or
FAILURE -> SLAVE LOST -> FAILURE or
FAILURE -> MANUALLY ABORTED -> FAILURE

which all produce two messages I would like to hide. Also, there is the possibility

SUCCESS -> SLAVE LOST/MANUALLY ABORTED -> FAILURE or
FAILURE -> SLAVE LOST/MANUALLY ABORTED -> SUCCESS

which I would hope to get one notification on (success->failure, or failure->success), although if this is tricky to implement, I would rather have no messages at all.

My rationale is that there are lots of build computers on the project network, and bad network gives often issues for us, which causes dozens of messages being sent out to the network, and people are starting to just ignore all messages that come from the buildbot, since 90% of the time they're spam.

I tried to research the docs, but could not find any info on how to configure this, so perhaps it's something to look forward to as a feature in the future?

Thanks!

Change History (3)

comment:1 Changed 5 years ago by dustin

  • Description modified (diff)
  • Milestone changed from undecided to 0.8.+

comment:2 Changed 5 years ago by dustin

You can do some of this with the <state>2<state> transitions, but I think the more complex stuff here is currently not possible.

comment:3 Changed 4 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.