Edgewall Software
Modify

Opened 14 years ago

Last modified 11 years ago

#594 new enhancement

send notification emails on build repair

Reported by: mazo@… Owned by:
Priority: minor Milestone:
Component: Trac plugin Version:
Keywords: Cc:
Operating System:

Description

For example,

  1. Revision 1 was successfully built
  2. Revision 2 broke the build
  3. Revision 3 tried to repair the build, but didn't succeed
  4. Revision 4 repaired the build and Build status is green again

It would be nice to receive notification emails about build of revision 4, that fixed the build.
In this case it's worth sending emails to both the person, who had broken the build and who repaired it.

To be a little more specific:

  • "Broken" means broken for any platform for a particular build configuration.
  • "Successful" means successful for all platforms for a particular build configuration.

In another words, e-mails about broken builds mean something like "Everybody! Help! The build is broken! Just do something!".
It would be nice to receive mails like "Everybody, calm down. Good work. Build is ok again."

I don't know whether this will be quite tricky to implement or not.
Looks like, it requires Bitten to be stateful.

Attachments (0)

Change History (4)

comment:1 follow-up: Changed 14 years ago by osimons

BTW, Bitten provides an internal IBuildListener API that you can hook your own plugins into - Bitten will make a call to any plugins for each build so that you can build whatever logic you want for notification and announcements.

Solve this feature request as a plugin, and we'll see where we take it. Perhaps a plugin for our new 'contrib' directory?

comment:2 in reply to: ↑ 1 Changed 14 years ago by mazo@…

Replying to osimons:

BTW, Bitten provides an internal IBuildListener API that you can hook your own plugins into - Bitten will make a call to any plugins for each build so that you can build whatever logic you want for notification and announcements.

Solve this feature request as a plugin, and we'll see where we take it. Perhaps a plugin for our new 'contrib' directory?

Thank you to point out the plugin-based approach and the API.
Sounds, that it's really easy to implement the requested feature.
I will be glad to contribute to Trac but unfortunately don't have much time for this right now.
Hope, I'll find time for this a bit later.

comment:3 Changed 11 years ago by ahippo@…

It looks like, the following patch implements the requested feature among others: https://gist.github.com/mgedmin/2875188

comment:4 Changed 11 years ago by osimons

Yes, partially. However to find the 'previous' build the gist just does build.id-1 for lookup which may only be correct in the most trivial of installations - ie. only one configuration with one platform generating new builds.

We need to find the previous build for the relevant config + platform. Something like the first item returned by Build.select(env, config=build.config, platform=build.platform, max_rev_time=build.rev_time). The query may of course also return empty if no previous builds exists for this config+platform.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.