• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      After updating the warnings plugin from 8.10.1 to 9.0.1 the number of warnings is inconsistent. I'm compiling several applications, sharing some sources in one jenkins project. If there is a warning in a shared code, it is logged once per application. As I know, before the update this log entries resulted in a single warning in the model. After the update there is one warning with one sub-report per logentry.
       
       
       

      This are the warnings of our last builds:

      Build Total New Fixed
      #2976 5.702 4.234  
      #2975 5.698 One  
      #2974 5.698 4.231  
      #2973 5.687 One  
      #2972 5.687 4.220  
      #2971 5.687 One  
      #2970 5.687 4.220  
      #2969 5.687 One  
      #2968 5.687 4.222  
      #2967 5.643 One  
      #2966 5.643 4.179 One
      #2965 5.643 One  
      #2964 5.643 4.179  
      #2963 5.643 One  
      #2962 5.643 4.179  
      #2961 5.643 One  

      It seems there are two groups that alternate. Group A where the new warnings are One  and group B where the new warnings are greater 4.000. Ich checked the behavior in another project. Both numers are different there, but the effect is the same.

      This are the effects of the different areas in both groups:

      Warnings Trend shows sub-reports for A and B.

      Overview

      A B
      shows warnings  shows sub-reports

      Details Table Summary

      A B
      shows warnings shows sub-reports

      Details Table content

      A B
      shows warnings shows warnings

      Details on warnings level

      A B
      shows warnings shows sub-reports

       
       

        1. 2950-delphixe-outstanding-issues.xml
          1 kB
        2. delphixe-new-issues.xml
          26 kB
        3. delphixe-outstanding-issues.xml
          1 kB
        4. detailsfileA.png
          detailsfileA.png
          12 kB
        5. detailsfileB.png
          detailsfileB.png
          41 kB
        6. detailslineA.png
          detailslineA.png
          20 kB
        7. detailslineB.png
          detailslineB.png
          20 kB
        8. detailssummaryA.png
          detailssummaryA.png
          20 kB
        9. detailssummaryB.png
          detailssummaryB.png
          20 kB
        10. history.png
          history.png
          14 kB
        11. image-2021-04-26-12-11-57-396.png
          image-2021-04-26-12-11-57-396.png
          26 kB
        12. overviewA.png
          overviewA.png
          9 kB
        13. overviewB.png
          overviewB.png
          9 kB
        14. screenshot-1.png
          screenshot-1.png
          46 kB
        15. screenshot-2.png
          screenshot-2.png
          80 kB
        16. screenshot-3.png
          screenshot-3.png
          60 kB

          [JENKINS-65382] Inconsistent number of new warnings

          Ulli Hafner added a comment -

          Hmm, strange. The different properties look fine. Severity and package is a reference just to save memory. Reference is the reference build which is not used in equals, id as well. Do you still have a result file of one of the builds before the upgrade? Maybe some properties are different.

          What makes me wonder: all issues have a fall back fingerprint: <fingerprint>FALLBACK-2e4a982f</fingerprint>. Did the warnings plugin report errors that it cannot read your source files now?

          Ulli Hafner added a comment - Hmm, strange. The different properties look fine. Severity and package is a reference just to save memory. Reference is the reference build which is not used in equals , id as well. Do you still have a result file of one of the builds before the upgrade? Maybe some properties are different. What makes me wonder: all issues have a fall back fingerprint: <fingerprint>FALLBACK-2e4a982f</fingerprint> . Did the warnings plugin report errors that it cannot read your source files now?

          I attached the xml from the last build before updating the plugin. I can't see any differences.

          Matthias Kretschmar added a comment - I attached the xml from the last build before updating the plugin. I can't see any differences.

          For fingerprint  problem there are some lines in the logs:
          [DelphiXE] [-ERROR-] Can't create fingerprints for some files:
          [DelphiXE] [-ERROR-] - '...', provided encoding 'UTF-8' seems to be wrong
          ...
          [DelphiXE] [-ERROR-] ... skipped logging of 1273 additional errors ...
          But this error already existed before the update. It seems to be, because we are actually switching from windows encoding to utf-8.

          Matthias Kretschmar added a comment - For fingerprint  problem there are some lines in the logs: [DelphiXE] [-ERROR-] Can't create fingerprints for some files: [DelphiXE] [-ERROR-] - '...', provided encoding 'UTF-8' seems to be wrong ... [DelphiXE] [-ERROR-] ... skipped logging of 1273 additional errors ... But this error already existed before the update. It seems to be, because we are actually switching from windows encoding to utf-8.

          Lübbe Onken added a comment -

          namuecyd for me it is interesting to see that you have the warnings-ng problems with delphi compiler output. We're using delphi too and just ran into the same problem. I wonder if it has something to do with the compiler output itself. I wrote a tool for our internal use that post-processes the dcc32 output and normalizes paths, so that there are either no relative or no absolute paths left in the output.

          Lübbe Onken added a comment - namuecyd for me it is interesting to see that you have the warnings-ng problems with delphi compiler output. We're using delphi too and just ran into the same problem. I wonder if it has something to do with the compiler output itself. I wrote a tool for our internal use that post-processes the dcc32 output and normalizes paths, so that there are either no relative or no absolute paths left in the output.

          Lübbe Onken added a comment - - edited

          This is totatlly crazy:

          One of the first failing builds
          Build 51: (+352 new FixInsight warnings, 633 total)

          Reset Quality gates -> next build
          Build 52; (633 total Fixinsight warnings)

          Build 53; (+352 new FixInsight warnings, 633 total) What?!?

          Note that the open task scanner never fails, even though it should come across quite a few duplicates as well.
          The Delphi compiler and FixInsight parsers are both Groovy based, in case this helps to localize the issue.

          The plugin was updated between builds 46 and 47. The graphs on the overview page look like this:

          Lübbe Onken added a comment - - edited This is totatlly crazy: One of the first failing builds Build 51: (+352 new FixInsight warnings, 633 total) Reset Quality gates -> next build Build 52; (633 total Fixinsight warnings) Build 53; (+352 new FixInsight warnings, 633 total) What?!? Note that the open task scanner never fails, even though it should come across quite a few duplicates as well. The Delphi compiler and FixInsight parsers are both Groovy based, in case this helps to localize the issue. The plugin was updated between builds 46 and 47. The graphs on the overview page look like this:

          Our project is a pipeline project. Our pipeline script replaces absolute paths by relative paths where possible und writes the output into logfiles.
          But if there is something wrong with the delphi output, or with our parsing, the error should be visible in the xmls I provided here.

          Matthias Kretschmar added a comment - Our project is a pipeline project. Our pipeline script replaces absolute paths by relative paths where possible und writes the output into logfiles. But if there is something wrong with the delphi output, or with our parsing, the error should be visible in the xmls I provided here.

          Ulli Hafner added a comment -

          Ok, I think I found the root cause for the problem: the new warning detection currently does not work if there are issues in a report of reports that are the same (with respect to equals). In version 9.x those issues have been counted as duplicate and were not added so this was no problem before. But now they are added if they are part of a different sub report.

          There are two ways to fix it: restore the old behavior and remove all duplicate issues, even if they are part of different sub-reports. Or I can try to make the delta computation aware of hierarchical reports.
          I wonder what you would like to see in your use case? When you are scanning n files that all contain the same warning, should there be just one warning or n of them?

          Ulli Hafner added a comment - Ok, I think I found the root cause for the problem: the new warning detection currently does not work if there are issues in a report of reports that are the same (with respect to equals ). In version 9.x those issues have been counted as duplicate and were not added so this was no problem before. But now they are added if they are part of a different sub report. There are two ways to fix it: restore the old behavior and remove all duplicate issues, even if they are part of different sub-reports. Or I can try to make the delta computation aware of hierarchical reports. I wonder what you would like to see in your use case? When you are scanning n files that all contain the same warning, should there be just one warning or n of them?

          In our logic it is one error, that has to be fixed one time. So it doesn't need to be there multiple times.

          Matthias Kretschmar added a comment - In our logic it is one error, that has to be fixed one time. So it doesn't need to be there multiple times.

          Lübbe Onken added a comment -

          I'm late to the party, but: "same here".
          The warning is caused by one file which is included several times via different build configurations, so it has to be fixed only once.

           

          Lübbe Onken added a comment - I'm late to the party, but: "same here". The warning is caused by one file which is included several times via different build configurations, so it has to be fixed only once.  

          Ulli Hafner added a comment - - edited

          I released a fix in 10.2.1. but since this fix breaks another thing I‘m not sure if I need to revert that PR. Changing a report after it has been created is not a good idea...

          Ulli Hafner added a comment - - edited I released a fix in 10.2.1. but since this fix breaks another thing I‘m not sure if I need to revert that PR. Changing a report after it has been created is not a good idea...

            drulli Ulli Hafner
            namuecyd Matthias Kretschmar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: