Opened 8 years ago

Last modified 2 years ago

#956 reopened enhancement

Send an email notification to the person who forces/rebuilds a build

Reported by: yogawa@… Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.1 Keywords: mail, users
Cc: rutsky.vladimir@…, Jeremy.Cornett@…

Description

I would like to have Buildbot send an email notification to the person who forces/rebuild build via the buildbot web interface. Buildbot have a field to enter "Name" when forcing/rebuilding build. Is there a way to use the field to enable this?

Change History (12)

comment:1 Changed 7 years ago by dustin

  • Milestone changed from undecided to 0.8.+
  • Type changed from undecided to enhancement

comment:2 Changed 7 years ago by dustin

  • Keywords mail added

comment:3 Changed 6 years ago by dustin

  • Keywords users added

comment:4 follow-up: Changed 5 years ago by jaredgrubb

Buildbot does this if you have the MailNotifier? send to "interested users".. or am I missing what this bug is about?

comment:5 Changed 5 years ago by rutsky

  • Cc rutsky.vladimir@… added

comment:6 in reply to: ↑ 4 Changed 4 years ago by dcoshea

Replying to jaredgrubb:

Buildbot does this if you have the MailNotifier? send to "interested users".. or am I missing what this bug is about?

If I set the MailNotifier's mode=["failing"], then the user that forced the build will only get mail if the forced build fails. I think the issue is not that Buildbot doesn't behave as documented, just that users (at least some I have spoken to) expect that forced/try builds should be different from automatically-scheduled builds, in that the interested user should get mail whether or not the forced/try build failed, whereas they don't want an email for every successful automatically-scheduled build.

I've considered subclassing MailNotifier and overriding isMailNeeded() to include this kind of logic, as I don't think that just adding another mode such as "force" would address all my user's requirements - I basically need to send email for failing builds on some builders, but send emails for all force/try builds on all builders. A slightly nicer option would be to add a parameter to the MailNotifier that accepts a predicate function indicating whether or not mail should be sent.

comment:7 Changed 4 years ago by Jeremy.Cornett

  • Cc Jeremy.Cornett@… added

comment:8 Changed 4 years ago by varun

comment:9 Changed 4 years ago by dustin

  • Resolution set to fixed
  • Status changed from new to closed

Which is now merged. Thanks, Varun!

comment:10 Changed 4 years ago by dustin

  • Resolution fixed deleted
  • Status changed from closed to reopened

But that's incomplete, actually - I'll revert it for the moment.

#! python
        if "force" in self.mode:
            return True

isn't enough -- this just makes the 'force' mode report *every* build.

MailNotifier needs some way to determine that a build was forced, and if that's the case and mode==force, notify.

comment:11 Changed 4 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

comment:12 Changed 2 years ago by rayalan

So this could be as straight-forward as having the scheduler write a property ("schedulertype") to the buildset, and then having the mail notifier read that property and notify if "force' in self.mode and schedulertype == 'forced'.

However, that approach seems a bit niche. Is there need for a more flexible solution? For example, a more flexible solution would be to make the mode schedulerdependent, pass in a function to determine which schedulertypes were dependent, and give each scheduler a type. The decision code would then be something like:

if "schedulerdependent" in self.mode and self.isSchedulerSignificant(build.getProperty('schedulertype')):
   return True 
Last edited 2 years ago by rayalan (previous) (diff)
Note: See TracTickets for help on using tickets.