• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-plugin
    • None
    • warnings-ng 1.0.0-beta2

      When I use this plugin in a declarative pipeline with parallel build stages where each stage runs recordIssues in it's post, the second of the two to run gets a:

      Error when executing always post condition: java.lang.IllegalStateException: ID analysis is already used by another action: io.jenkins.plugins.analysis.core.views.ResultAction for Static Analysis at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.ensureThatIdIsUnique(IssuesPublisher.java:99) at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:82) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:571) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:501) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:481) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
      

      Is using this plugin in parallel stages not supported?

          [JENKINS-54027] ID analysis is already used by another action

          Ulli Hafner added a comment -

          Sorry about the confusion. I decided to move all new code to a completely new plugin: warnings-ng.hpi. The old code (required if you have old jobs) is part of warnings.hpi.
          So you need latest warnings-ng.hpi and analysis-model-api.hpi. If you have jobs using the old API you need additionally warnings.hpi and analysis-core.hpi.

          Ulli Hafner added a comment - Sorry about the confusion. I decided to move all new code to a completely new plugin: warnings-ng.hpi. The old code (required if you have old jobs) is part of warnings.hpi. So you need latest warnings-ng.hpi and analysis-model-api.hpi. If you have jobs using the old API you need additionally warnings.hpi and analysis-core.hpi.

          So to clarify, after installing  http://updates.jenkins-ci.org/download/plugins/analysis-model-api/1.0.0-beta12/analysis-model-api.hpi and http://updates.jenkins-ci.org/download/plugins/warnings-ng/1.0.0-beta3/warnings-ng.hpi I can remove:

          Enabled Version
          Static Analysis Collector Plug-in
          This plug-in is an add-on for the plug-ins Checkstyle, Dry, FindBugs, PMD, Tasks, and Warnings: the plug-in collects the different analysis results and shows the results in a combined trend graph. Additionally, the plug-in provides health reporting and build stability based on these combined results.
          1.52
          Warnings Plug-in
          This plug-in collects the compiler warnings of the project modules and visualizes the results.
          5.0.0-beta3

          ?

          Brian J Murrell added a comment - So to clarify, after installing  http://updates.jenkins-ci.org/download/plugins/analysis-model-api/1.0.0-beta12/analysis-model-api.hpi  and http://updates.jenkins-ci.org/download/plugins/warnings-ng/1.0.0-beta3/warnings-ng.hpi  I can remove: Enabled Version Static Analysis Collector Plug-in This plug-in is an add-on for the plug-ins Checkstyle, Dry, FindBugs, PMD, Tasks, and Warnings: the plug-in collects the different analysis results and shows the results in a combined trend graph. Additionally, the plug-in provides health reporting and build stability based on these combined results. 1.52 Warnings Plug-in This plug-in collects the compiler warnings of the project modules and visualizes the results. 5.0.0-beta3 ?

          Do both warnings.hpi and warnings-ng.hpi use recordIssues as their pipeline invocation or do I need something different for warnings-ng?

          Brian J Murrell added a comment - Do both warnings.hpi and warnings-ng.hpi use recordIssues  as their pipeline invocation or do I need something different for warnings-ng?

          So I disabled the above two plugins and installed  http://updates.jenkins-ci.org/download/plugins/analysis-model-api/1.0.0-beta12/analysis-model-api.hpi and http://updates.jenkins-ci.org/download/plugins/warnings-ng/1.0.0-beta3/warnings-ng.hpi and left the recordIssues in my Jenkinsfile and ended up getting:

          java.lang.NoSuchMethodError: edu.hm.hafner.analysis.IssueParser.parse(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/util/function/Function;)Ledu/hm/hafner/analysis/Report;
          	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInConsoleLog(IssuesScanner.java:117)
          	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:63)
          	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:588)
          	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:547)
          	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:529)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
          	at hudson.security.ACL.impersonate(ACL.java:290)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          Finished: FAILURE 

          Brian J Murrell added a comment - So I disabled the above two plugins and installed  http://updates.jenkins-ci.org/download/plugins/analysis-model-api/1.0.0-beta12/analysis-model-api.hpi and http://updates.jenkins-ci.org/download/plugins/warnings-ng/1.0.0-beta3/warnings-ng.hpi  and left the recordIssues in my Jenkinsfile and ended up getting: java.lang.NoSuchMethodError: edu.hm.hafner.analysis.IssueParser.parse(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/util/function/Function;)Ledu/hm/hafner/analysis/Report; at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInConsoleLog(IssuesScanner.java:117) at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:63) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:588) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:547) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:529) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE

          Ulli Hafner added a comment - - edited

          Sorry, seems that I messed up the versions. This should be fixed in warnings-ng 1.0.0-beta4 and analysis-model-api 1.0.0-beta13.

          Ulli Hafner added a comment - - edited Sorry, seems that I messed up the versions. This should be fixed in warnings-ng 1.0.0-beta4 and analysis-model-api 1.0.0-beta13.

          Still not really seeing any improvement on the exclusion list:

          Static Analysis - Messages

          Error Messages

           
          Can't resolve absolute paths for some files:

          • topology-linux.c
          • topology-linux.c
          • topology-linux.c
          • topology-linux.c
          • topology-linux.c
            ... skipped logging of 758 additional errors ...
            Can't create fingerprints for some files:
          • 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c
          • 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c
          • 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c
          • 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c
          • 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c
            ... skipped logging of 758 additional errors ...
            Can't create blame requests for some affected files:
          • Skipping non-workspace file topology-linux.c
          • Skipping non-workspace file topology-linux.c
          • Skipping non-workspace file topology-linux.c
          • Skipping non-workspace file topology-linux.c
          • Skipping non-workspace file topology-linux.c
            ... skipped logging of 758 additional errors ...
            Created no blame requests - Git blame will be skipped
            Information Messages

            Parsing console log (workspace: '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA')
            Post processing issues on 'wolf-53vm12' with encoding 'UTF-8'
            Resolving absolute file names for all issues
            -> 0 resolved, 763 unresolved, 14 already absolute
            Copying affected files to Jenkins' build folder /var/lib/jenkins/jobs/daos-stack-org/jobs/daos/branches/PR-13/builds/523
            -> 0 copied, 9 not in workspace, 172 not-found, 0 with I/O error
            Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
            -> resolved module names for 777 issues
            Resolving package names (or namespaces) by parsing the affected files
            -> resolved package names of 181 affected files
            Applying 2 filters on the set of 777 issues (14 issues have been removed, 763 issues will be published)
            Creating fingerprints for all affected code blocks to track issues over different builds
            -> created fingerprints for 0 issues
            Invoking Git blamer to create author and commit information for all affected files
            GIT_COMMIT env = 'HEAD'
            Git working tree = '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA'
            Git commit ID = 'd9b0fbf7e62d89604238f786b6955e74f759325d'
            Job workspace = '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA'
            -> blamed authors of issues in 0 files
            Parsing console log (workspace: '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA')
            Using reference build 'daos-stack-org/daos/PR-13 #492' to compute new, fixed, and outstanding issues
            Issues delta (vs. reference build): outstanding: 763, new: 0, fixed: 0
            No quality gates have been set - skipping
            Health report is disabled - skipping
             

          This is the Jenkinsfile snippet this is from:

                      parallel {
                          stage('Build on CentOS 7') {
                              agent {
                                  dockerfile {
                                      filename 'Dockerfile.centos:7'
                                      dir 'utils/docker'
                                      label 'docker_runner'
                                      additionalBuildArgs '$BUILDARGS'
                                      customWorkspace("/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-centos7")
                                  }
                              }
                              steps {
                                  sconsBuild()
                                  stash name: 'CentOS-install', includes: 'install/**'
                                  stash name: 'CentOS-build-vars', includes: '.build_vars.*'
                                  stash name: 'CentOS-tests', includes: 'build/src/rdb/raft/src/tests_main, build/src/common/tests/btree_direct, build/src/common/tests/btree, src/common/tests/btree.sh, build/src/common/tests/sched, build/src/client/api/tests/eq_tests, src/vos/tests/evt_ctl.sh, build/src/vos/vea/tests/vea_ut, src/rdb/raft_tests/raft_tests.py'
                              }
                          }
                          stage('Build on Ubuntu 18.04') {
                              agent {
                                  dockerfile {
                                      filename 'Dockerfile.ubuntu:18.04'
                                      dir 'utils/docker'
                                      label 'docker_runner'
                                      additionalBuildArgs '$BUILDARGS'
                                      customWorkspace("/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-ubuntu18")
                                  }
                              }
                              steps {
                                  sconsBuild()
                              }
                          }
                      }
                      post {
                          always {
                              recordIssues enabledForFailure: true,
                                           aggregatingResults: true,
                                           tools: [
                                               [tool: [$class: 'GnuMakeGcc']],
                                               [tool: [$class: 'CppCheck']],
                                           ],
                                           filters: [excludeFile('.*\\/_build\\.external\\/.*'),
                                                     excludeFile('_build\\.external\\/.*')]
                          }
                      }
          

          Brian J Murrell added a comment - Still not really seeing any improvement on the exclusion list: Static Analysis - Messages Error Messages   Can't resolve absolute paths for some files: topology-linux.c topology-linux.c topology-linux.c topology-linux.c topology-linux.c ... skipped logging of 758 additional errors ... Can't create fingerprints for some files: 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c 'topology-linux.c', IO exception has been thrown: java.nio.file.NoSuchFileException: topology-linux.c ... skipped logging of 758 additional errors ... Can't create blame requests for some affected files: Skipping non-workspace file topology-linux.c Skipping non-workspace file topology-linux.c Skipping non-workspace file topology-linux.c Skipping non-workspace file topology-linux.c Skipping non-workspace file topology-linux.c ... skipped logging of 758 additional errors ... Created no blame requests - Git blame will be skipped Information Messages Parsing console log (workspace: '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA') Post processing issues on 'wolf-53vm12' with encoding 'UTF-8' Resolving absolute file names for all issues -> 0 resolved, 763 unresolved, 14 already absolute Copying affected files to Jenkins' build folder /var/lib/jenkins/jobs/daos-stack-org/jobs/daos/branches/PR-13/builds/523 -> 0 copied, 9 not in workspace, 172 not-found, 0 with I/O error Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files) -> resolved module names for 777 issues Resolving package names (or namespaces) by parsing the affected files -> resolved package names of 181 affected files Applying 2 filters on the set of 777 issues (14 issues have been removed, 763 issues will be published) Creating fingerprints for all affected code blocks to track issues over different builds -> created fingerprints for 0 issues Invoking Git blamer to create author and commit information for all affected files GIT_COMMIT env = 'HEAD' Git working tree = '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA' Git commit ID = 'd9b0fbf7e62d89604238f786b6955e74f759325d' Job workspace = '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA' -> blamed authors of issues in 0 files Parsing console log (workspace: '/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-XSYVVAKVRRCIRZBUBQLEPYMVXQHYAQV52HHPQR55EURLM5NXUHMA') Using reference build 'daos-stack-org/daos/PR-13 #492' to compute new, fixed, and outstanding issues Issues delta (vs. reference build): outstanding: 763, new: 0, fixed: 0 No quality gates have been set - skipping Health report is disabled - skipping   This is the Jenkinsfile snippet this is from: parallel { stage('Build on CentOS 7') { agent { dockerfile { filename 'Dockerfile.centos:7' dir 'utils/docker' label 'docker_runner' additionalBuildArgs '$BUILDARGS' customWorkspace("/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-centos7") } } steps { sconsBuild() stash name: 'CentOS-install', includes: 'install/**' stash name: 'CentOS-build-vars', includes: '.build_vars.*' stash name: 'CentOS-tests', includes: 'build/src/rdb/raft/src/tests_main, build/src/common/tests/btree_direct, build/src/common/tests/btree, src/common/tests/btree.sh, build/src/common/tests/sched, build/src/client/api/tests/eq_tests, src/vos/tests/evt_ctl.sh, build/src/vos/vea/tests/vea_ut, src/rdb/raft_tests/raft_tests.py' } } stage('Build on Ubuntu 18.04') { agent { dockerfile { filename 'Dockerfile.ubuntu:18.04' dir 'utils/docker' label 'docker_runner' additionalBuildArgs '$BUILDARGS' customWorkspace("/var/lib/jenkins/workspace/daos-stack-org_daos_PR-13-ubuntu18") } } steps { sconsBuild() } } } post { always { recordIssues enabledForFailure: true, aggregatingResults: true, tools: [ [tool: [$class: 'GnuMakeGcc']], [tool: [$class: 'CppCheck']], ], filters: [excludeFile('.*\\/_build\\.external\\/.*'), excludeFile('_build\\.external\\/.*')] } }

          I just got the following error:

           
          java.lang.IllegalStateException: ID analysis is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Static Analysis
           

          I working in a three parallel stages.
          Two of them will work on the same machine (all windows at the moment).

          The error happens on the machine, where two parallel steps are happening.

           

          recordIssues aggregatingResults: true, tools: [msBuild(id: "${profile}_DI")]

           

          We are using Jenkins 2.150.2, Warnings Next Generation 2.1.2 & Analysis Model api 2.0.2.

          Jan Linnenkohl added a comment - I just got the following error:   java.lang.IllegalStateException: ID analysis is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Static Analysis   I working in a three parallel stages. Two of them will work on the same machine (all windows at the moment). The error happens on the machine, where two parallel steps are happening.   recordIssues aggregatingResults: true , tools: [msBuild(id: "${profile}_DI" )]   We are using Jenkins 2.150.2, Warnings Next Generation 2.1.2 & Analysis Model api 2.0.2.

          Ulli Hafner added a comment -

          Do not use aggregatingResults: true if you are just parsing a single tool, otherwise the synthetic ID analysis will be used.

          Ulli Hafner added a comment - Do not use aggregatingResults: true if you are just parsing a single tool, otherwise the synthetic ID analysis will be used.

          It works, when it disable aggregating results:

          recordIssues aggregatingResults: false, tools: [msBuild(id: "${profile}_DI")]

          Jan Linnenkohl added a comment - It works, when it disable aggregating results: recordIssues aggregatingResults: false, tools: [msBuild(id: "${profile}_DI")]

          Ulli Hafner added a comment -

          Yes, see JENKINS-55445.

          Ulli Hafner added a comment - Yes, see JENKINS-55445 .

            drulli Ulli Hafner
            brianjmurrell Brian J Murrell
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: