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

Incorrect implementation of RetryStepExecution.stop

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Looks that way. Thanks for noticing!

            jglick Jesse Glick added a comment - Looks that way. Thanks for noticing!
            svanoort Sam Van Oort added a comment -

            jglick I think we got all the parts released here, right?

            svanoort Sam Van Oort added a comment - jglick I think we got all the parts released here, right?

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java
            http://jenkins-ci.org/commit/pipeline-stage-step-plugin/addb287b9d5b81f3d4ab3b15fb6dd33e7370062a
            Log:
            Merge pull request #12 from jglick/StepExecution.stop-JENKINS-26148

            JENKINS-26148 Using default implementation of StepExecution.stop

            Compare: https://github.com/jenkinsci/pipeline-stage-step-plugin/compare/d19fefc1433e...addb287b9d5b

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java http://jenkins-ci.org/commit/pipeline-stage-step-plugin/addb287b9d5b81f3d4ab3b15fb6dd33e7370062a Log: Merge pull request #12 from jglick/StepExecution.stop- JENKINS-26148 JENKINS-26148 Using default implementation of StepExecution.stop Compare: https://github.com/jenkinsci/pipeline-stage-step-plugin/compare/d19fefc1433e...addb287b9d5b

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java
            http://jenkins-ci.org/commit/pipeline-stage-step-plugin/f2f9f7d6096af3c6b53971a549b214032bd833f0
            Log:
            JENKINS-26148 Using default implementation of StepExecution.stop.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java http://jenkins-ci.org/commit/pipeline-stage-step-plugin/f2f9f7d6096af3c6b53971a549b214032bd833f0 Log: JENKINS-26148 Using default implementation of StepExecution.stop.

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepExecution.java
            http://jenkins-ci.org/commit/pipeline-build-step-plugin/3ff14391fe27c8ee9ccea9ba1977131fe3b26dbe
            Log:
            Merge pull request #15 from jglick/StepExecution.stop-JENKINS-26148

            JENKINS-26148 Using default implementation of StepExecution.stop

            Compare: https://github.com/jenkinsci/pipeline-build-step-plugin/compare/269bccee2654...3ff14391fe27

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepExecution.java http://jenkins-ci.org/commit/pipeline-build-step-plugin/3ff14391fe27c8ee9ccea9ba1977131fe3b26dbe Log: Merge pull request #15 from jglick/StepExecution.stop- JENKINS-26148 JENKINS-26148 Using default implementation of StepExecution.stop Compare: https://github.com/jenkinsci/pipeline-build-step-plugin/compare/269bccee2654...3ff14391fe27

            People

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

              Dates

                Created:
                Updated:
                Resolved: