• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None

      The Javadoc says

      Enumerates active running StepExecution s in the system.

      It is not specified exactly what "active" or "running" mean in this context, but at any rate I have found that StepExecutionIteratorImpl only includes innermost steps, not their containing block steps, because it calls FlowExecution.getCurrentExecutions which is documented to behave that way.

      This means that it is impossible to find a StepExecution of a block-scoped step unless it is not currently running its body. (Before or after running the body, it seems to work.) If this behavior is intentional, it needs to be documented more clearly, and I would request some way to get even enclosing executions.

          [JENKINS-26163] StepExecutionIterator omits outer executions

          Jesse Glick created issue -

          Jesse Glick added a comment -

          Currently blocking some tests of the waitUntil step: there is no reliable way to get a handle on the StepExecution from the test, since there is only a short period of time during which its body is not being run.

          From the implementation of that step itself, this problem does not arise, since we only need to find the StepExecution (to work around the missing API noted in JENKINS-26148) between body invocations.

          Jesse Glick added a comment - Currently blocking some tests of the waitUntil step: there is no reliable way to get a handle on the StepExecution from the test, since there is only a short period of time during which its body is not being run. From the implementation of that step itself, this problem does not arise, since we only need to find the StepExecution (to work around the missing API noted in JENKINS-26148 ) between body invocations.
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-25570 [ JENKINS-25570 ]

          Jesse Glick added a comment -

          Alternately it would suffice to have something @CheckForNull StepExecution StepExecution.getParent() that would return an enclosing step if there is one.

          Jesse Glick added a comment - Alternately it would suffice to have something @CheckForNull StepExecution StepExecution.getParent() that would return an enclosing step if there is one.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26513 [ JENKINS-26513 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26148 [ JENKINS-26148 ]
          Jesse Glick made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 158 (Web Link)" [ 13001 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          http://jenkins-ci.org/commit/workflow-plugin/20af35a04a92c839f0289ce339f1667167c8c4c6
          Log:
          JENKINS-26163 Noting internal bug as well as known user-visible effects.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md http://jenkins-ci.org/commit/workflow-plugin/20af35a04a92c839f0289ce339f1667167c8c4c6 Log: JENKINS-26163 Noting internal bug as well as known user-visible effects.

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

              Created:
              Updated:
              Resolved: