• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • Jenkins ver. 1.554.3
      Warnings Plug-in 4.47
      Static Analysis Utilities 1.71

      I am using the $WARNINGS_NEW token in my email notifications but (most of the time?) its value does not match the one shown in the warning results page of the build.
      Instead, the new $WARNINGS_NEW seems to be equal to $WARNINGS_COUNT.

      For example:
      I get a mail reporting 118 warnings in total and 118 new warnings.
      When I open the warnings result page it shows 118 warnings in total and 0 new warnings (which is correct).

      I remember that I already had mails where the values were not equal but I can't recognize any pattern and again, most of the time, the new warnings value is wrong.

          [JENKINS-28494] Incorrect value of WARNINGS_NEW token

          Ulli Hafner added a comment -

          From looking at the code it looks ok. I need to update the acceptance tests with the email-ext integration first: currently the number of new warnings is equal to the actual number of warnings which hides this bug.

          Ulli Hafner added a comment - From looking at the code it looks ok. I need to update the acceptance tests with the email-ext integration first: currently the number of new warnings is equal to the actual number of warnings which hides this bug.

          Jochen Ulrich added a comment -

          Seems like this problem depends on the parser being used.
          The Doxygen parser seems to provide correct values for $WARNINGS_NEW but the "GNU Make + GNU C Compiler (gcc)" parser provides wrong values.

          Jochen Ulrich added a comment - Seems like this problem depends on the parser being used. The Doxygen parser seems to provide correct values for $WARNINGS_NEW but the "GNU Make + GNU C Compiler (gcc)" parser provides wrong values.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisSettings.java
          src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsBuildSettings.java
          src/test/java/plugins/AbstractAnalysisTest.java
          src/test/java/plugins/AnalysisCollectorPluginTest.java
          src/test/java/plugins/WarningsPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/cd7e1407aa5b5feb789f9b77185a1a52cff09650
          Log:
          Improved token macro tests for JENKINS-28494.

          Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/e38955e49e1e...cd7e1407aa5b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisSettings.java src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsBuildSettings.java src/test/java/plugins/AbstractAnalysisTest.java src/test/java/plugins/AnalysisCollectorPluginTest.java src/test/java/plugins/WarningsPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/cd7e1407aa5b5feb789f9b77185a1a52cff09650 Log: Improved token macro tests for JENKINS-28494 . Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/e38955e49e1e...cd7e1407aa5b

          Ulli Hafner added a comment -

          I finally found the time to write a new acceptance test that has different values for total, new and fixed warnings. Since the tests succeeds, the problem might be somewhere else. Did you compare the mail result with the results in the job overview? Or did you just look at the details?

          I think the new warnings computation is somewhat limited so the plug-in might get not all new warnings right. But this is a different issue.

          Ulli Hafner added a comment - I finally found the time to write a new acceptance test that has different values for total, new and fixed warnings. Since the tests succeeds, the problem might be somewhere else. Did you compare the mail result with the results in the job overview? Or did you just look at the details? I think the new warnings computation is somewhat limited so the plug-in might get not all new warnings right. But this is a different issue.

          Jochen Ulrich added a comment - - edited

          Did you compare the mail result with the results in the job overview? Or did you just look at the details?

          I didn't look at the numbers on the job overview.

          Looking through our current build history, the numbers on the job overview always match the ones on the details view. However, our history is not that long and unfortunately (for this issue ) our builds were quite stable in the last time, so it's hard to trace the issue.
          I just had one mail in the last time and that contained correct numbers (using Jenkins ver. 1.615, Warnings Plug-in 4.48, Static Analysis Utilities 1.72, Email Extension Plugin 2.40.5 and Token Macro Plugin 1.10).

          I'll report back if the issue occurs again.

          Jochen Ulrich added a comment - - edited Did you compare the mail result with the results in the job overview? Or did you just look at the details? I didn't look at the numbers on the job overview. Looking through our current build history, the numbers on the job overview always match the ones on the details view. However, our history is not that long and unfortunately (for this issue ) our builds were quite stable in the last time, so it's hard to trace the issue. I just had one mail in the last time and that contained correct numbers (using Jenkins ver. 1.615, Warnings Plug-in 4.48, Static Analysis Utilities 1.72, Email Extension Plugin 2.40.5 and Token Macro Plugin 1.10). I'll report back if the issue occurs again.

          Jochen Ulrich added a comment -

          Problem seems to have vanished. Reopen if necessary.

          Jochen Ulrich added a comment - Problem seems to have vanished. Reopen if necessary.

            drulli Ulli Hafner
            julrich Jochen Ulrich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: