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

JobDSL step fails with error: Failed to interrupt and stop 1 build of xxxxx

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      In exceptional cases(most of the time it runs fine) I experience the error: 
      (I think the job in question was still building or was finishing up. Hard to say after the facts)

      hudson.AbortException: Failed to interrupt and stop 1 build of Testcases » E2E » xxx » xxx» xxx » xxx » xxx (information omitted for privacy reasons)
      at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:374)
      at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      Caused: java.util.concurrent.ExecutionException
      at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.get(CpsBodyExecution.java:308)
      at com.mig82.folders.step.FolderPropertiesStep$Execution.run(FolderPropertiesStep.java:55)
      at com.mig82.folders.step.FolderPropertiesStep$Execution.run(FolderPropertiesStep.java:37)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate2(ACL.java:449)
      at hudson.security.ACL.impersonate(ACL.java:461)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:829)
      Finished: FAILURE
       
      

      While running the following command in my pipeline step:

      jobDsl lookupStrategy: 'SEED_JOB', sandbox: true, targets: targets.join('\n'), ignoreMissingFiles: true, additionalParameters: additionalParameters, removedJobAction: 'DELETE', removedViewAction: 'IGNORE'

      I think the error occurs while executing the removedJobAction because it happens under the "Unreferenced items: " section in the log.

      This gets the job in question into a "ghost state": it still exists but JobDSL is not recognizing it anymore and is not deleting it anymore in the next runs.

       

      running on Jenkins 2.319.3 with Job DSL plugin: version 1.77

            jamietanna Jamie Tanna
            vonnyboe Vincent De Haen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: