Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-953

Email-ext: Fixed email is sent if build goes from unstable to unstable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      This is for the email-ext plugin.

      Ive configured a job to send an email to a global notification list, if the
      build fails or if it has been fixed.

      If the last build was unstable and the new build is also unstable then I receive
      an email stating that the build has been fixed. As both builds were unstable I
      dont expect an email to be sent out stating that the build was fixed.

        Attachments

          Activity

          Hide
          redsolo redsolo added a comment -

          I assigned it to myself for no good reason.

          Show
          redsolo redsolo added a comment - I assigned it to myself for no good reason.
          Hide
          dwdyer dwdyer added a comment -

          I see this too, with failed -> failed, when I have problems with ISSUE#949.

          The Ant build completes successfully but the Cobertura plugin reporting fails,
          so the build is marked as failed. If the same thing happens next time, I get
          an e-mail saying the "build is back to normal", but nothing has changed and the
          latest build is still marked as a failure.

          Show
          dwdyer dwdyer added a comment - I see this too, with failed -> failed, when I have problems with ISSUE#949. The Ant build completes successfully but the Cobertura plugin reporting fails, so the build is marked as failed. If the same thing happens next time, I get an e-mail saying the "build is back to normal", but nothing has changed and the latest build is still marked as a failure.
          Hide
          redsolo redsolo added a comment -

          I guess part of the problem is the way the email-ext plugin is adding itself to
          the publisher list:
          BuildStep.PUBLISHERS.add(ExtendedEmailPublisher.DESCRIPTOR);

          I think fixing this issue would only require changing it to,
          BuildStep.PUBLISHERS.addNotifier(ExtendedEmailPublisher.DESCRIPTOR);

          Show
          redsolo redsolo added a comment - I guess part of the problem is the way the email-ext plugin is adding itself to the publisher list: BuildStep.PUBLISHERS.add(ExtendedEmailPublisher.DESCRIPTOR); I think fixing this issue would only require changing it to, BuildStep.PUBLISHERS.addNotifier(ExtendedEmailPublisher.DESCRIPTOR);
          Hide
          mindless Alan Harder added a comment -

          Is this old issue still a problem?

          Show
          mindless Alan Harder added a comment - Is this old issue still a problem?
          Hide
          mindless Alan Harder added a comment -

          Will close soon without further input, thanks.

          Show
          mindless Alan Harder added a comment - Will close soon without further input, thanks.
          Hide
          ashlux ashlux added a comment -

          I couldn't reproduce this, at least as a unit test.

          Show
          ashlux ashlux added a comment - I couldn't reproduce this, at least as a unit test.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : ashlux
          Path:
          trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java
          https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java?view=diff&rev=26119&p1=trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java&p2=trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java&r1=26118&r2=26119
          trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildStatusContentTest.java
          https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildStatusContentTest.java?view=auto&rev=26119
          http://jenkins-ci.org/commit/26119
          Log:
          [FIXED JENKINS-953] When the pre-build trigger is used with $BUILD_STATUS, the status is incorrectly reported as successful or fixed. Reporting the build's status as "fixed", "success", etc. doesn't make sense when the build is still building.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : ashlux Path: trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java?view=diff&rev=26119&p1=trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java&p2=trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java&r1=26118&r2=26119 trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildStatusContentTest.java https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildStatusContentTest.java?view=auto&rev=26119 http://jenkins-ci.org/commit/26119 Log: [FIXED JENKINS-953] When the pre-build trigger is used with $BUILD_STATUS, the status is incorrectly reported as successful or fixed. Reporting the build's status as "fixed", "success", etc. doesn't make sense when the build is still building.

            People

            • Assignee:
              ashlux ashlux
              Reporter:
              redsolo redsolo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: