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

ID analysis is already used by another action

    Details

    • Similar Issues:
    • Released As:
      warnings-ng 1.0.0-beta2

      Description

      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?

        Attachments

          Activity

          Hide
          brianjmurrell 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\\/.*')]
                          }
                      }
          
          Show
          brianjmurrell 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\\/.*')] } }
          Hide
          climblinne 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.

          Show
          climblinne 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.
          Hide
          drulli 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.

          Show
          drulli 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.
          Hide
          climblinne Jan Linnenkohl added a comment -

          It works, when it disable aggregating results:

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

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

          Yes, see JENKINS-55445.

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: