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

warnings-plugin chooses wrong reference build, counts too many new warnings

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • warnings-plugin
    • None

      I think this started when I upgraded the warnings-plugin to 4.6.
      Some of our people want to fail builds when they get new warnings, so have thresholds set for that. The plugin is then supposed to compare the number of warnings to the last successful build. After upgrade to 4.6 it has instead chosen to compare to the last build before the upgrade, as if it doesn't recognise the newer builds.
      A difference between before and now is also that we now have multiple graphs (not a problem, but maybe a contributing reason).

      We mostly have jobs with multiple parsers, sometimes using a custom parser. Of the embedded parsers we use the "GNU Compiler" and "MSBuild" parsers.

      I have seen other "funny" cases where build #N had 246 warnings and build #N+1 had 247, yet there were no new warnings according to the plugin. That job has 2 parsers working on 2 files each.

      Let me know if you need to know more about our setup or the jobs?

          [JENKINS-14292] warnings-plugin chooses wrong reference build, counts too many new warnings

          Ulli Hafner added a comment -

          Can you please add some more details?
          E.g. what is printed on the console ([WARNINGS] ...), what is the number of warnings in one of the new builds and the reference build. Is the reference build created with release 3.x?

          What changed from 3.x to 4.x: Now each parser has it's own results. I.e. the results of Java warnings are compared to old results of Java warnings. Of course this will lead to wrong results when comparing a 4.x build with a 3.x build.

          Ulli Hafner added a comment - Can you please add some more details? E.g. what is printed on the console ( [WARNINGS] ...), what is the number of warnings in one of the new builds and the reference build. Is the reference build created with release 3.x? What changed from 3.x to 4.x: Now each parser has it's own results. I.e. the results of Java warnings are compared to old results of Java warnings. Of course this will lead to wrong results when comparing a 4.x build with a 3.x build.

          torbent added a comment -

          Sorry about replying so late; missed the notification email, apparently.
          I cannot really tell what version of the plugin the reference builds used. I don't think I was far behind on the upgrades, but it could have been a month or two ... 4.6 was the newest when I upgraded.

          Here are some console output snippets:
          First we have build #760 of jobA:

          Build done
          [WARNINGS] Parsing warnings in files 'jobres*.txt' with parser MSBuild
          [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobA
          [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobA\jobresA.txt of module with 28 warnings.
          [WARNINGS] Parsing warnings in files 'jobres*.txt' with parser XmlDoc Warnings
          [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobA
          [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobA\jobresA.txt of module with 313 warnings.
          [WARNINGS] Computing warning deltas based on reference build #700
          Archiving artifacts

          Build #700 is gone by now. Actually things started working as expected as the old builds expired, which backs your incompability statement. It would have been nice, though, if the plugin had chosen no reference instead of one it couldn't use anyway.

          Next snippet is from build #284 of jobB:

          Build done
          [WARNINGS] Parsing warnings in files 'jobresWin.txt' with parser MSBuild
          [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobB
          [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobB\jobresWin.txt of module with 5 warnings.
          [WARNINGS] Parsing warnings in files 'jobresLinux.txt' with parser GNU Compiler 4 (gcc)
          [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobB
          [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobB\jobresLinux.txt of module with 5 warnings.
          [WARNINGS] Computing warning deltas based on reference build #267
          [TASKS] Scanning folder 'S:\jenkins\workspaces\jobB' for files matching the pattern '*/.cpp,*/.h' - excludes: build/*,lib/*
          [TASKS] Found 53 files to scan for tasks
          [TASKS] Found 2 open tasks.
          [TASKS] Computing warning deltas based on reference build #283
          Archiving artifacts

          This one shows that the tasks plugin has a different idea about reference than the warnings plugin.

          The reference builds were in both cases (and many more cases) the last build made before upgrading to warnings 4.6.
          The problem seems to have "solved" itself as the builds expire, but that only works because we do expire builds...

          torbent added a comment - Sorry about replying so late; missed the notification email, apparently. I cannot really tell what version of the plugin the reference builds used. I don't think I was far behind on the upgrades, but it could have been a month or two ... 4.6 was the newest when I upgraded. Here are some console output snippets: First we have build #760 of jobA: Build done [WARNINGS] Parsing warnings in files 'jobres*.txt' with parser MSBuild [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobA [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobA\jobresA.txt of module with 28 warnings. [WARNINGS] Parsing warnings in files 'jobres*.txt' with parser XmlDoc Warnings [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobA [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobA\jobresA.txt of module with 313 warnings. [WARNINGS] Computing warning deltas based on reference build #700 Archiving artifacts Build #700 is gone by now. Actually things started working as expected as the old builds expired, which backs your incompability statement. It would have been nice, though, if the plugin had chosen no reference instead of one it couldn't use anyway. Next snippet is from build #284 of jobB: Build done [WARNINGS] Parsing warnings in files 'jobresWin.txt' with parser MSBuild [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobB [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobB\jobresWin.txt of module with 5 warnings. [WARNINGS] Parsing warnings in files 'jobresLinux.txt' with parser GNU Compiler 4 (gcc) [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\jobB [WARNINGS] Successfully parsed file S:\jenkins\workspaces\jobB\jobresLinux.txt of module with 5 warnings. [WARNINGS] Computing warning deltas based on reference build #267 [TASKS] Scanning folder 'S:\jenkins\workspaces\jobB' for files matching the pattern '* / .cpp,* / .h' - excludes: build/* ,lib/ * [TASKS] Found 53 files to scan for tasks [TASKS] Found 2 open tasks. [TASKS] Computing warning deltas based on reference build #283 Archiving artifacts This one shows that the tasks plugin has a different idea about reference than the warnings plugin. The reference builds were in both cases (and many more cases) the last build made before upgrading to warnings 4.6. The problem seems to have "solved" itself as the builds expire, but that only works because we do expire builds...

          Ulli Hafner added a comment -

          Ok, then I'm closing this issue. Since I still need to change the serialization again, this would be too complicated to get working.

          Ulli Hafner added a comment - Ok, then I'm closing this issue. Since I still need to change the serialization again, this would be too complicated to get working.

          torbent added a comment -

          Closing. The underlying problem was fixed in some other issue.

          torbent added a comment - Closing. The underlying problem was fixed in some other issue.

            drulli Ulli Hafner
            torbent torbent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: