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

Retry after restart causes IllegalStateException: ID spotbugs is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for SpotBugs

      With a Jenkinsfile using an idiom retrying a node block after a controller or agent failure,
      and the content of the node block including usage of

      recordIssues(tool: spotBugs(), qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]])

      then the build fails after restart with the following stacktrace

      java.lang.IllegalStateException: ID spotbugs is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for SpotBugs
      
      	at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.ensureThatIdIsUnique(IssuesPublisher.java:147)
      	at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:97)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:879)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:798)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:760)
      	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1176)
      	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1131)
      

      The proper behaviour should be to overwrite the existing report with a warning.

          [JENKINS-72920] Retry after restart causes IllegalStateException: ID spotbugs is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for SpotBugs

          Vincent Latombe created issue -
          Ulli Hafner made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Jesse Glick made changes -
          Resolution Original: Won't Fix [ 2 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Ulli Hafner made changes -
          Component/s New: coverage-plugin [ 29223 ]
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ]

            Unassigned Unassigned
            vlatombe Vincent Latombe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: