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

Incorrect implementation of RetryStepExecution.stop

XMLWordPrintable

      https://github.com/jenkinsci/workflow-plugin/commit/6be3d810597079905b6d19911bd40139ee4ec0eb purported to let stop kill its body. Yet this implementation can only work for the first round. For the second and subsequent rounds, the BodyExecution created by Callback.onFailure is thrown away, and body will still be the first one, which will presumably cause CpsBodyExecution.cancel to be a no-op since isDone().

      So somehow the Callback needs to get a handle back to its RetryStepExecution. But how? You could use StepExecution.applyAll to find all the candidates, but how would you select the right one if there are several? ExecutorStepExecution.Callback overloads cookie for this purpose, but that is used also for ProcessKiller; it seems like a hack here. ParallelStep uses ResultHandler, apparently assuming that identical objects are linked in the reference graph during serialization.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: