No messages printed from block-scoped steps after they invoked their bodies#19
Conversation
…hey invoked their bodies.
|
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
|
🐝 as I understand it... but my comprehension is not at its best right nie |
| * (for example by calling {@link StepContext#get} on demand rather than by using {@link StepContextParameter}). | ||
| */ | ||
| private static boolean isRunning(FlowNode node) { | ||
| if (node instanceof BlockStartNode) { |
There was a problem hiding this comment.
@jglick I think this is really iffy -- you are potentially scanning the flow back to the beginning of time if it happens to be a BlockStartNode.
I would caution against this because it is likely to lead to O(n^2) performance if invoked incautiously.
There was a problem hiding this comment.
you are potentially scanning the flow back to the beginning of time
Right, because in
node { // #1
for (int i = 0; i < 1000; i++) {sh 'echo' /* #2 */}
}the current head would include point 2 and we need to scan back to point 1 if this method is called. Now we could add caching etc. if there an API for it.
|
Seems to have caused a regression in |
Superseded by #15 but this is a far more conservative and localized change.
Background: in JENKINS-34637 I would like
TimeoutStepExecutionto print something to the build log when its body times out. Without this patch, that is impossible—the log message is discarded.@reviewbybees