[JIRA] (JENKINS-56324) Age does not look correct for new issues when compared with a reference build

2 views
Skip to first unread message

juliehirani@hotmail.com (JIRA)

unread,
Feb 28, 2019, 7:27:02 AM2/28/19
to jenkinsc...@googlegroups.com
Julie Shamji created an issue
 
Jenkins / Improvement JENKINS-56324
Age does not look correct for new issues when compared with a reference build
Issue Type: Improvement Improvement
Assignee: Ulli Hafner
Components: warnings-ng-plugin
Created: 2019-02-28 12:26
Priority: Minor Minor
Reporter: Julie Shamji

Our project is configured with a reference build, the console shows that build has been used for comparison, however the age for the issues are always shown as 1 even though they were flagged in a previous build.

The console log for build #183 shows:
05:01:38 [Static Analysis] Using reference build 'XXXX #165' to compute new, fixed, and outstanding issues*05:01:38* [Static Analysis] Issues delta (vs. reference build): outstanding: 25055, new: 427, fixed: 517*05:01:38* [Static Analysis] Evaluating quality gates*05:01:38* [Static Analysis] -> WARNING - Total number of issues (Severity High): 291 - Quality Gate: 270*05:01:38* [Static Analysis] -> WARNING - Number of new issues: 427 - Quality Gate: 1*05:01:38* [Static Analysis] -> Some quality gates have been missed: overall result is WARNING*05:01:38* [Static Analysis] Health report is disabled - skipping*05:01:40* [Static Analysis] Created analysis result for 25482 issues (found 427 new issues, fixed 517 issues)
Some of these issues have been introduced in build #166, but when I look at build #183, these same lines are shown with the Age of 1, shouldn't have an age relevant to the build it was first seen in?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 12:33:02 PM2/28/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
Change By: Ulli Hafner
Our project is configured with a reference build, the console shows that build has been used for comparison, however the age for the issues are always shown as 1 even though they were flagged in a previous build.

The console log for build #183 shows:

{noformat}
*05:01:38* [Static Analysis] Using reference build 'XXXX #165' to compute new, fixed, and outstanding issues*05:01:38* [Static Analysis] Issues delta (vs. reference build): outstanding: 25055, new: 427, fixed: 517*05:01:38* [Static Analysis] Evaluating quality gates*05:01:38* [Static Analysis] -> WARNING - Total number of issues (Severity High): 291 - Quality Gate: 270*05:01:38* [Static Analysis] -> WARNING - Number of new issues: 427 - Quality Gate: 1*05:01:38* [Static Analysis] -> Some quality gates have been missed: overall result is WARNING*05:01:38* [Static Analysis] Health report is disabled - skipping*05:01:40* [Static Analysis] Created analysis result for 25482 issues (found 427 new issues, fixed 517 issues)

{noformat}


Some of these issues have been introduced in build #166, but when I look at build #183, these same lines are shown with the Age of 1, shouldn't have an age relevant to the build it was first seen in?

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 12:34:03 PM2/28/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 12:34:03 PM2/28/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 12:34:04 PM2/28/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 12:40:02 PM2/28/19
to jenkinsc...@googlegroups.com
Ulli Hafner commented on Improvement JENKINS-56324
 
Re: Age does not look correct for new issues when compared with a reference build

Is the age for all these warning wrong? Some warnings are new and fixed so they count as new even though they are old. This is a problem of the new warnings detection.

juliehirani@hotmail.com (JIRA)

unread,
Feb 28, 2019, 12:57:02 PM2/28/19
to jenkinsc...@googlegroups.com

They are new since the reference build and not fixed since the reference build.

Literally every build since the reference build is showing every issue with age of 1, there are no issues with any other age.

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 3:01:01 PM2/28/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 28, 2019, 3:29:02 PM2/28/19
to jenkinsc...@googlegroups.com
Ulli Hafner commented on Bug JENKINS-56324
 
Re: Age does not look correct for new issues when compared with a reference build

Ah, this definitely is a bug. Can you please check for one warning that is part of the view [your-job]/[your-build-number]/[tool id]/Outstanding/ how it is persisted on disk? This information is located in $JENKINS_HOME/jobs/[your-job]/builds/[your-build-number]/[tool id]-outstanding-issues.xml.

It should look similar to:

<?xml version='1.1' encoding='UTF-8'?>
<analysisReport plugin="analysis-...@2.1.1-SNAPSHOT">
  <elements class="linked-hash-set">
    <issue>
      <category></category>
      <type>ConstructorLeaksThis</type>
      <severity>NORMAL</severity>
      <message>Constructors should not pass the &apos;this&apos; reference out in method invocations, since the object may not be fully constructed.</message>
      <lineStart>82</lineStart>
      <lineEnd>82</lineEnd>
      <columnStart>44</columnStart>
      <columnEnd>44</columnEnd>
      <lineRanges/>
      <id>6aac1320-237d-4481-8f15-bfa536f5d1cc</id>
      <description>&lt;p&gt;&lt;a href=&quot;https://errorprone.info/bugpattern/ConstructorLeaksThis&quot;&gt;See ErrorProne documentation.&lt;/a&gt;&lt;/p&gt;</description>
      <reference>11</reference>
      <origin>error-prone</origin>
      <moduleName>Static Analysis Model and Parsers</moduleName>
      <packageName>edu.hm.hafner.analysis</packageName>
      <fileName>/Users/hafner/Development/jenkins/workspace/New - Pipeline - Model/src/main/java/edu/hm/hafner/analysis/Report.java</fileName>
      <fingerprint>80C3F57B38248EC7695EF8BDFCA9F7A9</fingerprint>
    </issue>
 </elements>
  <infoMessages/>
  <errorMessages/>
  <duplicatesSize>0</duplicatesSize>
</analysisReport>

juliehirani@hotmail.com (JIRA)

unread,
Mar 1, 2019, 5:54:03 AM3/1/19
to jenkinsc...@googlegroups.com

On the front end I see these issues first found in build #166:

On build #183, as you can see its the same file and lines:

The XML issue for these ones are the following but they are in the new issues xml. I could not find them in the outstanding issues xml.

Build #163:

    <issue>
      <category>Whitespace</category>
      <type>WhitespaceAroundCheck</type>
      <severity reference="../../issue[23]/severity"/>
      <message>&apos;=&apos; is not followed by whitespace.</message>
      <lineStart>25</lineStart>
      <lineEnd>25</lineEnd>
      <columnStart>52</columnStart>
      <columnEnd>52</columnEnd>
      <lineRanges/>
      <id>4c6eabb4-53d4-47a0-b092-8519885923d6</id>
      <description></description>
      <reference>166</reference>
      <origin>checkstyle</origin>
      <moduleName>Soft Entity Service</moduleName>
      <packageName>com.unisys.holmes2.h2ng.softentity.quickSearch.impl</packageName>
      <fileName>C:/Program Files (x86)/Jenkins/workspace/U-LEAF Full with Site/holmes2ng/softentity-service/src/test/java/com/unisys/holmes2/h2ng/softentity/quickSearch/impl/DescriptionAndUrnQuickSearchTest.java</fileName>
      <fingerprint>D0C733D61919401C83027E30C424C021</fingerprint>
    </issue>
    <issue>
      <category>Whitespace</category>
      <type>ParenPadCheck</type>
      <severity reference="../../issue[23]/severity"/>
      <message>&apos;(&apos; is followed by whitespace.</message>
      <lineStart>33</lineStart>
      <lineEnd>33</lineEnd>
      <columnStart>16</columnStart>
      <columnEnd>16</columnEnd>
      <lineRanges/>
      <id>cec69a06-7fdd-44a1-b121-b083859e9c44</id>
      <description></description>
      <reference>166</reference>
      <origin>checkstyle</origin>
      <moduleName>Soft Entity Service</moduleName>
      <packageName>com.unisys.holmes2.h2ng.softentity.quickSearch.impl</packageName>
      <fileName>C:/Program Files (x86)/Jenkins/workspace/U-LEAF Full with Site/holmes2ng/softentity-service/src/test/java/com/unisys/holmes2/h2ng/softentity/quickSearch/impl/DescriptionAndUrnQuickSearchTest.java</fileName>
      <fingerprint>C274C7C7DC82B5063FAFEA7E18F1389C</fingerprint>
    </issue>

Build #183:

    <issue>
      <category>Whitespace</category>
      <type>WhitespaceAroundCheck</type>
      <severity reference="../../issue[21]/severity"/>
      <message>&apos;=&apos; is not followed by whitespace.</message>
      <lineStart>25</lineStart>
      <lineEnd>25</lineEnd>
      <columnStart>52</columnStart>
      <columnEnd>52</columnEnd>
      <lineRanges/>
      <id>a03d2555-c7fc-4281-8d36-639d0c89cb46</id>
      <description></description>
      <reference>183</reference>
      <origin>checkstyle</origin>
      <moduleName>Soft Entity Service</moduleName>
      <packageName>com.unisys.holmes2.h2ng.softentity.quickSearch.impl</packageName>
      <fileName>C:/Program Files (x86)/Jenkins/workspace/U-LEAF Full with Site/holmes2ng/softentity-service/src/test/java/com/unisys/holmes2/h2ng/softentity/quickSearch/impl/DescriptionAndUrnQuickSearchTest.java</fileName>
      <fingerprint>D0C733D61919401C83027E30C424C021</fingerprint>
    </issue>
    <issue>
      <category>Whitespace</category>
      <type>ParenPadCheck</type>
      <severity reference="../../issue[21]/severity"/>
      <message>&apos;(&apos; is followed by whitespace.</message>
      <lineStart>33</lineStart>
      <lineEnd>33</lineEnd>
      <columnStart>16</columnStart>
      <columnEnd>16</columnEnd>
      <lineRanges/>
      <id>eb02b7b7-f3f3-467f-ba9d-6fbe0737c515</id>
      <description></description>
      <reference>183</reference>
      <origin>checkstyle</origin>
      <moduleName>Soft Entity Service</moduleName>
      <packageName>com.unisys.holmes2.h2ng.softentity.quickSearch.impl</packageName>
      <fileName>C:/Program Files (x86)/Jenkins/workspace/U-LEAF Full with Site/holmes2ng/softentity-service/src/test/java/com/unisys/holmes2/h2ng/softentity/quickSearch/impl/DescriptionAndUrnQuickSearchTest.java</fileName>
      <fingerprint>C274C7C7DC82B5063FAFEA7E18F1389C</fingerprint>
    </issue>

Does this have something to do with ignoreQualityGate?

There are many others with the same issue but on a different line because of change made to the file. Are these expected to be marked as fixed and new as they are on a new line? If so, this should be age 1 from the build the line changed, but from then one, the age should grow each day until the line moves or fixed right?

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 2, 2019, 11:15:02 AM3/2/19
to jenkinsc...@googlegroups.com

Hmm, the `WhitespaceAroundCheck` warning in #183 and #163 are identical, even the fingerprint that compares the source code is the same (D0C733D61919401C83027E30C424C021). It should have been marked as outstanding.

Can you please check if in the outstanding xml of build #183 the same fingerprint (D0C733D61919401C83027E30C424C021) is used somewhere? Maybe I already matched another warning...

juliehirani@hotmail.com (JIRA)

unread,
Mar 4, 2019, 8:03:02 AM3/4/19
to jenkinsc...@googlegroups.com

I have checked both builds outstanding XML and the id D0C733D61919401C83027E30C424C021 is not present in the files at all.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 4, 2019, 9:12:02 AM3/4/19
to jenkinsc...@googlegroups.com

Is a warning in outstanding.xml that has most of the properties equal to the new warning?

<issue>
      <category>Whitespace</category>
      <type>WhitespaceAroundCheck</type>
      <severity reference="../../issue[21]/severity"/>
      <message>&apos;=&apos; is not followed by whitespace.</message>
      <lineStart>25</lineStart>
      <lineEnd>25</lineEnd>
      <columnStart>52</columnStart>
      <columnEnd>52</columnEnd>
      <lineRanges/>
      <id>a03d2555-c7fc-4281-8d36-639d0c89cb46</id>
      <description></description>
      <reference>183</reference>
      <origin>checkstyle</origin>
      <moduleName>Soft Entity Service</moduleName>
      <packageName>com.unisys.holmes2.h2ng.softentity.quickSearch.impl</packageName>
      <fileName>C:/Program Files (x86)/Jenkins/workspace/U-LEAF Full with Site/holmes2ng/softentity-service/src/test/java/com/unisys/holmes2/h2ng/softentity/quickSearch/impl/DescriptionAndUrnQuickSearchTest.java</fileName>
      <fingerprint>D0C733D61919401C83027E30C424C021</fingerprint>
    </issue>

ullrich.hafner@gmail.com (JIRA)

unread,
Apr 23, 2019, 1:59:02 PM4/23/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
May 8, 2019, 6:20:13 PM5/8/19
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Status: Fixed but Unreleased Resolved
Released As: 5.0.0 (analysis-model and warnings-ng)
Reply all
Reply to author
Forward
0 new messages