Change By: Stéphane Bruckert (19/Jul/13 3:08 PM)
Environment: Jenkins 1.513
Email-ext 2.28

Default email plugin "E-mail Notification" is NOT activated. This is a sure fact.
Description: In my job configuration, I selected all triggers, because I want as much information as possible (see screenshot). But I received two emails for the same build. IMHO, this is not the expected behavior (or it is a bug) because a build with REGRESSIONS inevitably means that the build is UNSTABLE.

{quote}
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
Email was triggered for: Unstable
Email was triggered for: Regression
Sending email for trigger: Unstable
Sending email to: stephane.bruckert@........
Sending email for trigger: Regression
Sending email to: stephane.bruckert@........
Finished: UNSTABLE
{quote}

REGRESSION has a reason to be triggered because new unit tests failed.
However, UNSTABLE shouldn't be triggered because REGRESSION should override it.
 The same applies to STILL UNSTABLE.

The problem looks to be in {{src/main/java/hudson/plugins/emailext/plugins/trigger/RegressionTrigger.java}}. Contrary to {{NthFailureTrigger.java}} or {{StillUnstableTrigger.java}}, it doesn't call the method {{addTriggerNameToReplace}} in order to discard the previous triggers.

So, the descriptor of {{RegressionTrigger.java}} should have a constructor with the following content:

{code:title=RegressionTrigger.java|borderStyle=solid}
public DescriptorImpl() {
    addTriggerNameToReplace(UnstableTrigger.TRIGGER_NAME);
    addTriggerNameToReplace(StillUnstableTrigger.TRIGGER_NAME);
}
{code} 

I am waiting for you to agree that this is a bug, before letting me correct it on the repository, if you agree.

Thank you very much!


Edit:
It is the same between the "Still Unstable" and "Improvement" triggers:
{quote}
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
Email was triggered for: Unstable
Email was triggered for: Improvement
Email was triggered for: Still Unstable
Trigger Unstable was overridden by another trigger and will not send an email.
Sending email for trigger: Still Unstable
Sending email to: stephane.bruckert@........
Sending email for trigger: Improvement
Sending email to: stephane.bruckert@........
Finished: UNSTABLE
{quote}

The improvement trigger is only triggered when there are LESS failing tests. So it is meant to be UNSTABLE or STILL UNSTABLE. Otherwise it would be SUCCESS or FIXED.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to