Multiple irrelevant email notifications during GIT merges

Hello friends!

I am looking for possibility to filter out email notifications of part of commiters.
The root of the problem is a sending by TeamCity an  email notification about failed build to all commiters after GIT merge.
Scenario:
1. Developer 'A' creates a branch from master and works on it, branch is not stable (complitely 'red')
2. 10 other people does commits to master branch
3. 'A' pulls all latest changes from master to his branch, merge changes and pushes it back to his origin/branch
4. TeamCity build fails and all 10 people recieves email notifications about failed build on this branch
As result - tons of not relevant notifications fills mailbox and of course lands in junk folder

Looks like this:
tc.png

I have an idea to write a plugin, that will catch email notifications before sending mails and will filter out all irrelevant users from the list.
I thought do this in "buildFinished" event handler but I am just confused what a object/manager can I use for this?
Any help will be accepted with appreciation

Thanks
Sergey

3 comments
Comment actions Permalink

Hi Sergey,

It seems there is no way in TeaMCIty open API to filter out users before sending out a notification.

Could you please describe how the developer's branch is configured in TeamCity?
Do you use feature branches? (available since TeamCity 7.1)

0
Comment actions Permalink

Hello Yegor,

Thank you for response

The current model that we use in development process is a one releasable master and many feature branches (it can be 30-40 concurrent branches)
In TeamCity each feature branch/project is actually a copy of master with same set of builds and with its own VCS root attached
In general it is very convenient for developers: in any time everyone can create it's own branch + TC project, do with it any thing, stabilize a feature and delete it later after back merge to master

I saw a feature branches in TC 7.1, but I think it is not suitable solution for us. If I understood right this assumes that we keep only one project with multiple builds of same type from different branches
So we will see a mix of green and red builds in one panel. Since we have a hundreds of commits in a day it's a little scary

Actually the only problem for us is a mail notifications: since the GIT stores commit only once - the committer will be in the list of changers (in terms of TC) after each merge from branch to branch

I have no idea how to solve this problem gracefully. The only way I see is to detect merge commits (by looking for commit message for example) and ignore all changers that came on the same train

Thanks for your concern
Sergey

0
Comment actions Permalink

Sergey,

I would still give feature branches a try as this is what they were developer for. The recommended approach is to have a dedicated project for the master and one for all the others. This way all the new feature branches appearing (matching a pattern) will get built automatically.
This approach can also behave better in terms of notifications (TW-24127).

As to your initial request - so far I could not come up with a good idea how that can be implemented provided the projects are different.
At some point http://youtrack.jetbrains.com/issue/TW-10705 can help here, however.

0

Please sign in to leave a comment.