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

SynchronousNonBlockingStepExecution should allow restart of idempotent steps

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It appears as though if the Jenkins master crashes whilst it is archiving artifacts then the workflow fails to resume.

      archiveArtifacts should be idempotent so it should be able to try again (if the slave / workspace still exists) In this case they should as I was only using dumb slaves.

      THe message should also say which step (class) could not be resumed - as I am just guessing it was the last one before the "resuming build" message

      ...
      Running: Stash some files to be used later in the build
      14:23:10 Stashed 1 file(s)
      Running: Allocate node : Body : End
      Running: Allocate node : End
      Running: Change Directory : Start
      14:23:11 Running in /home/jenkins/slave/workspace/automated_release/packaging/target
      Running: Change Directory : Body : Start
      Running: Change Directory : Start
      14:23:11 Running in /home/jenkins/slave/workspace/automated_release/packaging/target/msi
      Running: Change Directory : Body : Start
      Running: Restore files previously stashed
      Running: Change Directory : Body : End
      Running: Change Directory : End
      Running: Change Directory : Body : End
      Running: Change Directory : End
      Running: Change Directory : Start
      14:23:29 Running in /home/jenkins/slave/workspace/automated_release/packaging/target
      Running: Change Directory : Body : Start
      Running: Archive Artifacts
      Resuming build
      Running: Change Directory : Body : End
      Running: Change Directory : End
      Running: Change Directory : Body : End
      Running: Change Directory : End
      Running: General Build Wrapper : Body : End
      Running: General Build Wrapper : End
      Running: Allocate node : Body : End
      Running: Allocate node : End
      Running: End of Workflow
      java.lang.Exception: Resume after a restart not supported for non-blocking synchronous steps
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution.onResume(AbstractSynchronousNonBlockingStepExecution.java:73)
      	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl$1.onSuccess(FlowExecutionList.java:176)
      	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl$1.onSuccess(FlowExecutionList.java:172)
      	at com.google.common.util.concurrent.Futures$6.run(Futures.java:975)
      	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
      	at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
      	at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
      	at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170)
      	at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$5.onSuccess(CpsFlowExecution.java:627)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$5.onSuccess(CpsFlowExecution.java:605)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:546)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	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:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            teilo James Nord created issue -
            teilo James Nord made changes -
            Field Original Value New Value
            Component/s workflow-plugin [ 18820 ]
            Component/s workflow [ 20823 ]
            Key SECURITY-205 JENKINS-30383
            Workflow Security v1.2 [ 165487 ] JNJira [ 165487 ]
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            Project Security Issues [ 10180 ] Jenkins [ 10172 ]
            Status Untriaged [ 10001 ] Open [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-25879 [ JENKINS-25879 ]
            jglick Jesse Glick made changes -
            Summary Failure to resume a workflow (due to archive artifacts?) AbstractSynchronousNonBlockingStepExecution should allow restart of idempotent steps
            jglick Jesse Glick made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ]
            jglick Jesse Glick made changes -
            Epic Link JENKINS-35399 [ 171192 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165488 ] JNJira + In-Review [ 181996 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s workflow-step-api-plugin [ 21718 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-39386 [ JENKINS-39386 ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-42355 [ JENKINS-42355 ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-43276 [ JENKINS-43276 ]
            jglick Jesse Glick made changes -
            Summary AbstractSynchronousNonBlockingStepExecution should allow restart of idempotent steps SynchronousNonBlockingStepExecution should allow restart of idempotent steps

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              teilo James Nord
              Votes:
              9 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated: