Builds affected by my changes not sending failed notifications

 

I'm seeing what I believe to be incorrect behaviour with the notification of failed events via email.
 

 
 

we have the group : All Users
 

 
 

That is setup as follows :
 

 
 

Builds affected by my changes
 

Branch filter +:*
 

 
 

Build fails : Ticked
 

Build is successful : Ticked
 

Build starts : Ticked
 

The rest unticked.
 

 
 

Now when the build starts that I have trigger by checkin I get a start email and if this build is successful I get a success email.
 

 
 

The problems start with the failed builds. The first time a build fails and is marked as (New) I get an email, but if the build fails the second time and it's the same runner that fails the build (In my case the Sonar Runner) I don't get an email. It's only if I introduce a new error caught by a new runner, I will then get a failed email again.
 

 
 

So to me it looks like I will only get an email when TeamCity deems the builds to be broken for a new reason, however this isn't the functionality I require. What I would like is, if I trigged a build and it fails I get an email, regardless of whether it's a new build error or not.


 



Attachment(s):
2015-07-02_16h17_08.png
3 comments
Comment actions Permalink

Hi Jon,

If the "Build affected by my changes" option is checked then the notification will be sent only if the builds contain your changes. Change here is any modification of the source code which you introduce. Does the second failed build actually contain changes committed by you?

0
Comment actions Permalink

Yes - Both changes will have been triggered by my code checkin.

I have just discovered something else, the problem might be limited to the Sonar Runner.

I have done the following :

1.) Added a compile error to source. A failed email was recieved, due to the compile error.
2.) Added another compile error to source. A failed email was receievd again, due to the compile error.
3.) Added a code rule violation that the SonarQube runner would see as a violation. A failed email was recived due to the issue increase.
4.) Added another code rule violation, again the build failed due to an increase of rule violations, but no emailk was recieved and the build wasn't marked as new (see attachment)



Attachment(s):
2015-07-02_17h07_21.png
0
Comment actions Permalink

I think what might help me get to the bottom of this is to know how TeamCity decides when an issue is marked as (New) failed. As it seems to be at this point a failed email is sent for "Builds affected by my changes".

What I'm guessing is that TeamCity can't differentiate between SonarQube failing the first time due to invalid code being introduced into the code base and additional fails recieved from SonarQube, even if by different users.

Edit : Actually the builds are failing for a custom "Failure Conditions" which is looking for a given piece of text in the build log and throws a failure message when it does. This message is always the same, so TeamCity see's it as the same failure.

Edit Edit : Making the failure condition text unique (appended the build number) means that even if the same runner fails, the fail reason is different and therefore Teamcity sees it as a new issue and emails. Image attached.



Attachment(s):
Failure.png
0

Please sign in to leave a comment.