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

Missing static analysis results in weather popup

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce

    Description

      I recently updated our Jenkins server from 1.565.2 to 1.596.2. As part of that, a lot of plugins that were fine had to be updated, to squelch various DEPRECATED warnings in the log file (and some things that just plain broke). Unfortunately, while updating the plugins I lost the thing that showed the results of our static analysis checking in the on-mouseover hover of "weather" on the main dashboard.

      This is a bit of a shot in the dark, but the plugins listed in "Environment" were the only ones that were related to static analysis checking in our deployment, so I'm hoping you know how to get that back. The developers apparently use it to quickly check on all the various projects, and having to click through to each one is burdensome.

      Attached is a screenshot of what we see now. Previously, "Static Checking" was another row in that popup.

      Attachments

        Activity

          teancom David Bishop created issue -
          drulli Ulli Hafner added a comment -

          Please add more details. How are the analysis plug-ins in the corresponding job configured? Do you see the results of the analysis plug-ins in the job view?

          drulli Ulli Hafner added a comment - Please add more details. How are the analysis plug-ins in the corresponding job configured? Do you see the results of the analysis plug-ins in the job view?
          teancom David Bishop added a comment -

          Attached are screenshots of the config as well as the job output.

          teancom David Bishop added a comment - Attached are screenshots of the config as well as the job output.
          teancom David Bishop made changes -
          Field Original Value New Value
          Attachment Static Analysis Job Output.png [ 29768 ]
          Attachment Analysis Plugin Config.png [ 29769 ]
          teancom David Bishop added a comment -

          I should mention again that I'm not positive I'm even in the right place. I only recently took ownership of this jenkins instance, and was not the person who configured the jobs or the original plugins. So if I'm barking up the wrong tree in terms of what plugin used to provide the "weather" output, please tell me.

          teancom David Bishop added a comment - I should mention again that I'm not positive I'm even in the right place. I only recently took ownership of this jenkins instance, and was not the person who configured the jobs or the original plugins. So if I'm barking up the wrong tree in terms of what plugin used to provide the "weather" output, please tell me.
          drulli Ulli Hafner added a comment -

          Can you please show what's hiding under the advanced button in checkstyle and analysis-collector etc.? There needs to be a value in the health thresholds. If not, then the weather report is not shown...

          drulli Ulli Hafner added a comment - Can you please show what's hiding under the advanced button in checkstyle and analysis-collector etc.? There needs to be a value in the health thresholds. If not, then the weather report is not shown...
          teancom David Bishop added a comment -

          Ah! I didn't even see those buttons (my browser window was a little too narrow). As it turns out, none of the thresholds were set. I put in 85% and 30% for everything and re-ran the job. Unfortunately, it didn't seem to help. The weather/pop-up still doesn't show any results. Attaching the expanded configs.

          teancom David Bishop added a comment - Ah! I didn't even see those buttons (my browser window was a little too narrow). As it turns out, none of the thresholds were set. I put in 85% and 30% for everything and re-ran the job. Unfortunately, it didn't seem to help. The weather/pop-up still doesn't show any results. Attaching the expanded configs.
          teancom David Bishop made changes -
          drulli Ulli Hafner added a comment -

          Can you please switch the values? It is for the number of warnings for 100% and 0% health, resp. I.e. the number of warnings for 100% should be smaller than the number of warnings for 0%.

          drulli Ulli Hafner added a comment - Can you please switch the values? It is for the number of warnings for 100% and 0% health, resp. I.e. the number of warnings for 100% should be smaller than the number of warnings for 0%.
          teancom David Bishop added a comment -

          I switched the values (actually set them to 0 and 4 respectively) and reran the job to no effect.

          teancom David Bishop added a comment - I switched the values (actually set them to 0 and 4 respectively) and reran the job to no effect.
          drulli Ulli Hafner added a comment -

          Hmm, this works quite well in my setup. Can you please have a look into the build.xml file of your latest build in that project? Are there the correct values filled into the fields of the corresponding plug-ins (replace * with plugin class name):

                <healthDescriptor class="hudson.plugins.*.*HealthDescriptor">
                  <priority>LOW</priority>
                  <healthy>0</healthy>
                  <unHealthy>4</unHealthy>
                  ...
          
          drulli Ulli Hafner added a comment - Hmm, this works quite well in my setup. Can you please have a look into the build.xml file of your latest build in that project? Are there the correct values filled into the fields of the corresponding plug-ins (replace * with plugin class name): <healthDescriptor class="hudson.plugins.*.*HealthDescriptor"> <priority>LOW</priority> <healthy>0</healthy> <unHealthy>4</unHealthy> ...
          drulli Ulli Hafner added a comment -

          Does this occur with all you jobs? Are the jobs freestyle, maven or multi-configuration?

          drulli Ulli Hafner added a comment - Does this occur with all you jobs? Are the jobs freestyle, maven or multi-configuration?
          teancom David Bishop added a comment -

          Those do exist in the build.xml for all three plugins. Here's one of the sections:

              <hudson.plugins.findbugs.FindBugsMavenResultAction plugin="findbugs@4.60">
                <defaultEncoding>UTF-8</defaultEncoding>
                <delegate class="hudson.plugins.findbugs.FindBugsResultAction">
                  <owner class="hudson.maven.MavenModuleSetBuild" reference="../../../.."/>
                  <healthDescriptor class="hudson.plugins.findbugs.FindBugsHealthDescriptor">
                    <priority>LOW</priority>
                    <healthy>0</healthy>
                    <unHealthy>4</unHealthy>
                    <thresholds plugin="analysis-core@1.71">
                      <unstableTotalAll></unstableTotalAll>
                      <unstableTotalHigh></unstableTotalHigh>
                      <unstableTotalNormal></unstableTotalNormal>
                      <unstableTotalLow></unstableTotalLow>
                      <failedTotalAll></failedTotalAll>
                      <failedTotalHigh></failedTotalHigh>
                      <failedTotalNormal></failedTotalNormal>
                      <failedTotalLow></failedTotalLow>
                    </thresholds>
                  </healthDescriptor>
                  <result class="hudson.plugins.findbugs.FindBugsReporterResult">
                    <owner class="hudson.maven.MavenModuleSetBuild" reference="../../../../.."/>
                    <modules>
                      <string>xxxxxxxxxxx-service</string>
                    </modules>
                    <numberOfModules>1</numberOfModules>
                    <defaultEncoding>UTF-8</defaultEncoding>
                    <numberOfWarnings>2</numberOfWarnings>
                    <numberOfNewWarnings>0</numberOfNewWarnings>
                    <numberOfFixedWarnings>0</numberOfFixedWarnings>
                    <delta>0</delta>
                    <lowDelta>0</lowDelta>
                    <normalDelta>0</normalDelta>
                    <highDelta>0</highDelta>
                    <lowWarnings>0</lowWarnings>
                    <normalWarnings>2</normalWarnings>
                    <highWarnings>0</highWarnings>
                    <zeroWarningsSinceBuild>0</zeroWarningsSinceBuild>
                    <zeroWarningsSinceDate>0</zeroWarningsSinceDate>
                    <zeroWarningsHighScore>3167719587</zeroWarningsHighScore>
                    <isZeroWarningsHighscore>false</isZeroWarningsHighscore>
                    <highScoreGap>0</highScoreGap>
                    <errors/>
                    <pluginResult>SUCCESS</pluginResult>
                    <successfulSinceBuild>0</successfulSinceBuild>
                    <successfulSinceDate>0</successfulSinceDate>
                    <successfulHighscore>0</successfulHighscore>
                    <isSuccessfulHighscore>false</isSuccessfulHighscore>
                    <successfulHighScoreGap>0</successfulHighScoreGap>
                    <isSuccessfulStateTouched>false</isSuccessfulStateTouched>
                    <referenceBuild>1369</referenceBuild>
                    <newThisWeek>0</newThisWeek>
                    <notInCloud>0</notInCloud>
                    <numberOfComments>0</numberOfComments>
                  </result>
                </delegate>
              </hudson.plugins.findbugs.FindBugsMavenResultAction>
          

          The jobs are all "maven" jobs. Is that an issue?

          teancom David Bishop added a comment - Those do exist in the build.xml for all three plugins. Here's one of the sections: <hudson.plugins.findbugs.FindBugsMavenResultAction plugin="findbugs@4.60"> <defaultEncoding>UTF-8</defaultEncoding> <delegate class="hudson.plugins.findbugs.FindBugsResultAction"> <owner class="hudson.maven.MavenModuleSetBuild" reference="../../../.."/> <healthDescriptor class="hudson.plugins.findbugs.FindBugsHealthDescriptor"> <priority>LOW</priority> <healthy>0</healthy> <unHealthy>4</unHealthy> <thresholds plugin="analysis-core@1.71"> <unstableTotalAll></unstableTotalAll> <unstableTotalHigh></unstableTotalHigh> <unstableTotalNormal></unstableTotalNormal> <unstableTotalLow></unstableTotalLow> <failedTotalAll></failedTotalAll> <failedTotalHigh></failedTotalHigh> <failedTotalNormal></failedTotalNormal> <failedTotalLow></failedTotalLow> </thresholds> </healthDescriptor> <result class="hudson.plugins.findbugs.FindBugsReporterResult"> <owner class="hudson.maven.MavenModuleSetBuild" reference="../../../../.."/> <modules> <string>xxxxxxxxxxx-service</string> </modules> <numberOfModules>1</numberOfModules> <defaultEncoding>UTF-8</defaultEncoding> <numberOfWarnings>2</numberOfWarnings> <numberOfNewWarnings>0</numberOfNewWarnings> <numberOfFixedWarnings>0</numberOfFixedWarnings> <delta>0</delta> <lowDelta>0</lowDelta> <normalDelta>0</normalDelta> <highDelta>0</highDelta> <lowWarnings>0</lowWarnings> <normalWarnings>2</normalWarnings> <highWarnings>0</highWarnings> <zeroWarningsSinceBuild>0</zeroWarningsSinceBuild> <zeroWarningsSinceDate>0</zeroWarningsSinceDate> <zeroWarningsHighScore>3167719587</zeroWarningsHighScore> <isZeroWarningsHighscore>false</isZeroWarningsHighscore> <highScoreGap>0</highScoreGap> <errors/> <pluginResult>SUCCESS</pluginResult> <successfulSinceBuild>0</successfulSinceBuild> <successfulSinceDate>0</successfulSinceDate> <successfulHighscore>0</successfulHighscore> <isSuccessfulHighscore>false</isSuccessfulHighscore> <successfulHighScoreGap>0</successfulHighScoreGap> <isSuccessfulStateTouched>false</isSuccessfulStateTouched> <referenceBuild>1369</referenceBuild> <newThisWeek>0</newThisWeek> <notInCloud>0</notInCloud> <numberOfComments>0</numberOfComments> </result> </delegate> </hudson.plugins.findbugs.FindBugsMavenResultAction> The jobs are all "maven" jobs. Is that an issue?
          teancom David Bishop added a comment -

          I figured it out! I was setting the thresholds under "Build Settings" but I hadn't put in thresholds for "Publish combined analysis results". Once I did that, it's working just fine. Thank you so much for your help!

          teancom David Bishop added a comment - I figured it out! I was setting the thresholds under "Build Settings" but I hadn't put in thresholds for "Publish combined analysis results". Once I did that, it's working just fine. Thank you so much for your help!
          teancom David Bishop made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          teancom David Bishop made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          drulli Ulli Hafner added a comment -

          Hmm, actually there should be also a line for each plug-in in the health report (when the health configuration is defined as you have shown above). Strange that these results are not shown, but the collector result is shown...

          drulli Ulli Hafner added a comment - Hmm, actually there should be also a line for each plug-in in the health report (when the health configuration is defined as you have shown above). Strange that these results are not shown, but the collector result is shown...
          teancom David Bishop added a comment -

          Ah! Well, my developers are now asking me for the broken-out results to show in the health report as well, so if you have any ideas as to somewhere else I can look I'm all ears.

          teancom David Bishop added a comment - Ah! Well, my developers are now asking me for the broken-out results to show in the health report as well, so if you have any ideas as to somewhere else I can look I'm all ears.
          teancom David Bishop made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          drulli Ulli Hafner added a comment -

          Works in my test setup (1.611) without any problems. I'll add an acceptance test and see if it behaves differently when used with 1.596.2.

          drulli Ulli Hafner added a comment - Works in my test setup (1.611) without any problems. I'll add an acceptance test and see if it behaves differently when used with 1.596.2.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorFreestyleBuildSettings.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorSettings.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisSettings.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/checkstyle/CheckStyleAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/findbugs/FindBugsAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/pmd/PmdAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/tasks/TaskScannerAction.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsAction.java
          src/test/java/plugins/AbstractAnalysisTest.java
          src/test/java/plugins/AnalysisCollectorPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/b9c687643cc774c6e82de20662fff9b0236c2d82
          Log:
          JENKINS-28360 Added a test case to verify the health reports.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorFreestyleBuildSettings.java src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorSettings.java src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisSettings.java src/main/java/org/jenkinsci/test/acceptance/plugins/checkstyle/CheckStyleAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/findbugs/FindBugsAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/pmd/PmdAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/tasks/TaskScannerAction.java src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsAction.java src/test/java/plugins/AbstractAnalysisTest.java src/test/java/plugins/AnalysisCollectorPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/b9c687643cc774c6e82de20662fff9b0236c2d82 Log: JENKINS-28360 Added a test case to verify the health reports.
          drulli Ulli Hafner added a comment -

          Is this still a problem in your environment? I just started the new acceptance tests with Jenkins 1.592.2 without any failures.

          drulli Ulli Hafner added a comment - Is this still a problem in your environment? I just started the new acceptance tests with Jenkins 1.592.2 without any failures.
          drulli Ulli Hafner made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 163197 ] JNJira + In-Review [ 197131 ]

          People

            drulli Ulli Hafner
            teancom David Bishop
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: