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

Regression trigger, improvement trigger, a few small improvements (PATCH)

    • Icon: Patch Patch
    • Resolution: Incomplete
    • Icon: Major Major
    • email-ext-plugin
    • None
    • Platform: All, OS: All

      Attached is a patch that adds the following to the email-ext plugin:

      • Regression trigger: Applies when current build has more failures than previous
        build.
      • Improvement trigger: Applies when current build has fewer failures than
        previous build.
      • Added options to tokens:
      • FAILED_TESTS: showStack option to suppress stack traces in the mail
      • CHANGES_SINCE_LAST_BUILD: showDependencies option to show changes in
        projects the current project depends on

      All of these have been tested and work on our Hudson instance.

          [JENKINS-3430] Regression trigger, improvement trigger, a few small improvements (PATCH)

          hanys added a comment - - edited

          comradep, ashlux:
          yes quite similar, but in fact different.

          My idea is not "triggered by total number of tests and its diff to previous build", but trigger by diff in tests itselfs, so there are three scenarios:

          • Still-Unstable-Increased ( "Test failed", "Checkstyle violation", "TODO tasks" whatever) - when there is +X diff on Result table
          • Still-Unstable-Decreased - when there is -X diff on Result table
          • Still-Unstable-Changed - when there is both -X diff and +X on Result table

          in this patch, my third scenario (Still-Unstable-Changed) is included & triggered in two triggers patched (Regression trigger or Improvement trigger) as it depends of what the change in SCM is (better or worst). But scenario Still-Unstable-Changed is imho valid and usefull (at least for me) and cannot be seen only by measuring diff of total count of failing tests.

          See more in JENKINS-5282. Comradep , if you like that idea, can you repatch to these 3 triggers? I can provide betatesting.

          hanys added a comment - - edited comradep, ashlux: yes quite similar, but in fact different. My idea is not "triggered by total number of tests and its diff to previous build", but trigger by diff in tests itselfs, so there are three scenarios: Still-Unstable-Increased ( "Test failed", "Checkstyle violation", "TODO tasks" whatever) - when there is +X diff on Result table Still-Unstable-Decreased - when there is -X diff on Result table Still-Unstable-Changed - when there is both -X diff and +X on Result table in this patch, my third scenario (Still-Unstable-Changed) is included & triggered in two triggers patched (Regression trigger or Improvement trigger) as it depends of what the change in SCM is (better or worst). But scenario Still-Unstable-Changed is imho valid and usefull (at least for me) and cannot be seen only by measuring diff of total count of failing tests. See more in JENKINS-5282 . Comradep , if you like that idea, can you repatch to these 3 triggers? I can provide betatesting.

          comradep added a comment -

          In principle I'd be happy to incorporate your idea, hanys. Unfortunately I'm currently extremely busy, and likely won't have any time to work on this until the first or second week of February. If it hasn't been resolved in some other way by then, I'll try to take a look.

          comradep added a comment - In principle I'd be happy to incorporate your idea, hanys. Unfortunately I'm currently extremely busy, and likely won't have any time to work on this until the first or second week of February. If it hasn't been resolved in some other way by then, I'll try to take a look.

          mponomarenko added a comment -

          any chances for this patch to be accepted?

          mponomarenko added a comment - any chances for this patch to be accepted?

          farshidce added a comment -

          hi,

          can you create github pull request for this change ?
          I can take a look at it and test it and help in getting this patch submitted

          farshidce added a comment - hi, can you create github pull request for this change ? I can take a look at it and test it and help in getting this patch submitted

          comradep added a comment -

          OK, pull request sent (to the main email-ext-plugin repo – I trust that's what you meant?).

          I've ported the patch to latest HEAD and implemented hanys' additional 4 triggers. Since I'm currently on a trip, I've been able to do literally no testing; use with care.

          comradep added a comment - OK, pull request sent (to the main email-ext-plugin repo – I trust that's what you meant?). I've ported the patch to latest HEAD and implemented hanys' additional 4 triggers. Since I'm currently on a trip, I've been able to do literally no testing; use with care.

          Mike Doherty added a comment -

          As the previous pull request from comradep appears to have stalled I've added a new pull request for just the initial two triggers, improvement and regression. https://github.com/jenkinsci/email-ext-plugin/pull/21

          We've been testing this on our team for several days now and all seems fine.

          Mike Doherty added a comment - As the previous pull request from comradep appears to have stalled I've added a new pull request for just the initial two triggers, improvement and regression. https://github.com/jenkinsci/email-ext-plugin/pull/21 We've been testing this on our team for several days now and all seems fine.

          Mike Doherty added a comment -

          Mike Doherty added a comment - Fixed in pull request 21 ( https://github.com/jenkinsci/email-ext-plugin/pull/21 )

          Jukka Zitting added a comment -

          The showStacks option doesn't work properly, so reopening. See https://github.com/jenkinsci/email-ext-plugin/pull/26 for a fix.

          Jukka Zitting added a comment - The showStacks option doesn't work properly, so reopening. See https://github.com/jenkinsci/email-ext-plugin/pull/26 for a fix.

          Code changed in jenkins
          User: Jukka Zitting
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/FailedTestsContent.java
          http://jenkins-ci.org/commit/email-ext-plugin/12a08fc0446dbb26f5b4bed2fe0f99cd1e5495f8
          Log:
          JENKINS-3430: Only include the stack trace if showStacks is true (the default)

          The previous implementation always included the stack trace, twice if showStacks was enabled!

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jukka Zitting Path: src/main/java/hudson/plugins/emailext/plugins/content/FailedTestsContent.java http://jenkins-ci.org/commit/email-ext-plugin/12a08fc0446dbb26f5b4bed2fe0f99cd1e5495f8 Log: JENKINS-3430 : Only include the stack trace if showStacks is true (the default) The previous implementation always included the stack trace, twice if showStacks was enabled!

          Alex Earl added a comment -

          Is this fixed or not?

          Alex Earl added a comment - Is this fixed or not?

            miked30 Mike Doherty
            comradep comradep
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: