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

Aggregated maven result shows empty data when a module fails the build due to a threshold being hit

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
      None
    • Environment:
      email-ext 2.24.1, jenkins 1.483, findbugs plugin 4.44, Static Analysis Utilities 1.47
    • Similar Issues:

      Description

      Maven aggregation results are not computed if the build failed during a maven module (due to a threshold being hit). I.e., the build creates a maven module result with status failure. However, the aggregation action on job level does not show these results.

        Attachments

        1. build.xml
          7 kB
        2. config.xml
          7 kB
        3. screenshot-1.jpg
          screenshot-1.jpg
          210 kB
        4. screenshot-2.jpg
          screenshot-2.jpg
          67 kB
        5. screenshot-3.jpg
          screenshot-3.jpg
          67 kB
        6. screenshot-4.jpg
          screenshot-4.jpg
          60 kB
        7. stat.png
          stat.png
          12 kB
        8. static-analysis.jelly
          15 kB

          Issue Links

            Activity

            Hide
            hhuynh hhuynh added a comment -

            I rerun it and took the a closer look and realized both Findbugs Warnings and Static Analysis Warnings disappeared after the failed run. I had to refresh the page to see that (otherwise, it would look like they're still there but they're actually links from successful build earlier). Screenshot attached. I have a temporarily instance of Jenkins running here http://173.167.103.153:8080

            Show
            hhuynh hhuynh added a comment - I rerun it and took the a closer look and realized both Findbugs Warnings and Static Analysis Warnings disappeared after the failed run. I had to refresh the page to see that (otherwise, it would look like they're still there but they're actually links from successful build earlier). Screenshot attached. I have a temporarily instance of Jenkins running here http://173.167.103.153:8080
            Hide
            drulli Ulli Hafner added a comment -

            Ok, I see. Then the problem is not in email only. It is in the internal logic of the maven code: the aggregating action is not created when the build failed in a maven module.

            Until this is fixed you can use as a workaround the unstable thresholds and not the failed ones (i.e. a warning sets the build to unstable). Alternatively, as you already described use the freestyle project.

            Show
            drulli Ulli Hafner added a comment - Ok, I see. Then the problem is not in email only. It is in the internal logic of the maven code: the aggregating action is not created when the build failed in a maven module. Until this is fixed you can use as a workaround the unstable thresholds and not the failed ones (i.e. a warning sets the build to unstable). Alternatively, as you already described use the freestyle project.
            Hide
            hhuynh hhuynh added a comment -

            Thank you. I'm glad we got some root cause of it. I've tried unstable thresholds and it's not quite working right either. HIGH, NORMAL and LOW counts are there but not the NEW or FIXED counts (still 0).

            I've used these calls:

            $

            {action.result.getNumberOfFixedWarnings()}

            $

            {action.result.getNumberOfNewWarnings()}

            which are available in class hudson.plugins.findbugs.FindBugsReporterResult (which is $

            {action.result.getClass()}

            )

            I can't use freestyle jobs unfortunately because we're relying on Maven dependencies fingerprints for our upstream/downstream relationships (we have a lot of projects)

            Show
            hhuynh hhuynh added a comment - Thank you. I'm glad we got some root cause of it. I've tried unstable thresholds and it's not quite working right either. HIGH, NORMAL and LOW counts are there but not the NEW or FIXED counts (still 0). I've used these calls: $ {action.result.getNumberOfFixedWarnings()} $ {action.result.getNumberOfNewWarnings()} which are available in class hudson.plugins.findbugs.FindBugsReporterResult (which is $ {action.result.getClass()} ) I can't use freestyle jobs unfortunately because we're relying on Maven dependencies fingerprints for our upstream/downstream relationships (we have a lot of projects)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/core/MavenResultAction.java
            http://jenkins-ci.org/commit/analysis-core-plugin/b506c418b4b3579d7cb71f31498cdbc21bbfc618
            Log:
            [FIXED JENKINS-15324] Aggregate build results if a failed build is
            caused by a plugin threshold.


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

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/MavenResultAction.java http://jenkins-ci.org/commit/analysis-core-plugin/b506c418b4b3579d7cb71f31498cdbc21bbfc618 Log: [FIXED JENKINS-15324] Aggregate build results if a failed build is caused by a plugin threshold. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #609
            [FIXED JENKINS-15324] Aggregate build results if a failed build is (Revision b506c418b4b3579d7cb71f31498cdbc21bbfc618)

            Result = SUCCESS

            Show
            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 [FIXED JENKINS-15324] Aggregate build results if a failed build is (Revision b506c418b4b3579d7cb71f31498cdbc21bbfc618) Result = SUCCESS

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                hhuynh hhuynh
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: