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

email-ext regression trigger not firing when it should

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • email-ext-plugin
    • linux
      jenkins 1.480.2
      email-ext 2.25

      I apologize in advance, because I can't imagine this isn't my problem.

      I have a simple project, the builds triggered successfully by a subversion callback. When an additional JUnit test fails, the "regression" trigger isn't fired.

      I attach screenshots of my email-ext config, the build info screen showing that the number of fails is "+1", and a screenshot of the console output from the build, showing that there was a fail, but "No emails were triggered."

      i'm sure i'm missing something very simple, but i've been staring at this for a while. i'd appreciate any help. thanks!

        1. ScreenShot011.png
          48 kB
          lcgerke gerke
        2. ScreenShot012.png
          5 kB
          lcgerke gerke
        3. ScreenShot013.png
          54 kB
          lcgerke gerke

          [JENKINS-16404] email-ext regression trigger not firing when it should

          lcgerke gerke created issue -

          Alex Earl added a comment -

          Are you using a Maven job, or a Free Style Job?

          Alex Earl added a comment - Are you using a Maven job, or a Free Style Job?

          lcgerke gerke added a comment -

          Sorry, should have said: maven job. Thanks!

          lcgerke gerke added a comment - Sorry, should have said: maven job. Thanks!

          Alex Earl added a comment -

          Ok, I'll see what I can do. I don't currently have any Maven stuff to test with.

          Alex Earl added a comment - Ok, I'll see what I can do. I don't currently have any Maven stuff to test with.

          Alex Earl added a comment -

          Here is the code for Regression Trigger. I'll have to try and setup something with Maven to test out your issue.

          public boolean trigger(AbstractBuild<?, ?> build) {
              if (build.getPreviousBuild() == null)
                  return build.getResult() == Result.FAILURE;
              if (build.getTestResultAction() == null) return false;
              if (build.getPreviousBuild().getTestResultAction() == null)
                  return build.getTestResultAction().getFailCount() > 0;
              return getNumFailures(build) > 
                      getNumFailures(build.getPreviousBuild());
          }
          

          Alex Earl added a comment - Here is the code for Regression Trigger. I'll have to try and setup something with Maven to test out your issue. public boolean trigger(AbstractBuild<?, ?> build) { if (build.getPreviousBuild() == null ) return build.getResult() == Result.FAILURE; if (build.getTestResultAction() == null ) return false ; if (build.getPreviousBuild().getTestResultAction() == null ) return build.getTestResultAction().getFailCount() > 0; return getNumFailures(build) > getNumFailures(build.getPreviousBuild()); }

          Alex Earl added a comment -

          I'm trying to figure out the history behind the getNumFailures method, it was implemented before I started working on the plugin.

          Alex Earl added a comment - I'm trying to figure out the history behind the getNumFailures method, it was implemented before I started working on the plugin.

          I'm seeing something similar in email-ext 2.24.1 and Jenkins 1.480.1.

          My failed and unstable triggers work ok, but it doesn't seem to catch regressions.
          The logs does not contain anything useful either...

          Could you post any workarounds if you find any?

          Michał Guminiak added a comment - I'm seeing something similar in email-ext 2.24.1 and Jenkins 1.480.1. My failed and unstable triggers work ok, but it doesn't seem to catch regressions. The logs does not contain anything useful either... Could you post any workarounds if you find any?

          Alex Earl added a comment -

          There wouldn't be any workarounds...there seems to be a code issue.

          Alex Earl added a comment - There wouldn't be any workarounds...there seems to be a code issue.

          I would also like to suggest that if one test is fixed and another is broken between builds it should still count as a regression I guess...

          Maybe we could check if there is a failing test with age 1 and then trigger the regression email?

          Michał Guminiak added a comment - I would also like to suggest that if one test is fixed and another is broken between builds it should still count as a regression I guess... Maybe we could check if there is a failing test with age 1 and then trigger the regression email?

          Alex Earl added a comment -

          If you are familiar with Java, you could fork the plugin on GitHub, make and test the changes and issue a pull request. It may get done sooner that way

          Alex Earl added a comment - If you are familiar with Java, you could fork the plugin on GitHub, make and test the changes and issue a pull request. It may get done sooner that way

            slide_o_mix Alex Earl
            lcgerke lcgerke gerke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: