-
Bug
-
Resolution: Fixed
-
Major
-
None
Give following pipeline script, b1 branch finishes immediately and b2 is not completed yet (waiting for input). I determine branch's completion from a branch's end FlowNode and calling FlowNode.isRunning() returns true instead false as its already completed. This makes BlueOcean API returns b1 as running whereas its already been completed.
node { stage("hey") { echo "hello from hey" } stage("par") { parallel ( "b1" : { echo 'hello from b1' }, "b2" : { def branchInput = input message: 'Please input branch to test against', parameters: [[$class: 'StringParameterDefinition', defaultValue: 'master', description: '', name: 'branch']] echo "BRANCH NAME: ${branchInput}" } ) } stage("ho") { echo "hello from ho" } }
- is blocking
-
JENKINS-40934 LogActionImpl listener inefficient; poor performance queuing large parallel workloads
-
- Resolved
-
- is related to
-
JENKINS-26139 FlowNode.isRunning should also check whether the execution is complete
-
- Resolved
-
- relates to
-
JENKINS-45553 Parallel pipeline execution scales poorly
-
- Closed
-
-
JENKINS-38398 Parallel branches do not show completed in the stage graph when the branch is finished
-
- Closed
-
- links to
> Rather than asking caller to infer that all has ended since you have this end block, which is true but 'isRunning() API' makes no sense to return true in this case as well.
Yeah, it's a clear bug in workflow-cps here. I think fixable, by looking more closely at cases with > 1 currentHead (and then seeing if it's the end of one of the currently executing branch). May be something I can fix as a small one-off fix (probably needs a change in workflow-api and workflow-cps though, due to spec).
In pipeline-graph-analysis I use a bit of a deeper inspection to work around this, by looking to see if the node is the BlockEndNode for a BlockStartNode which is a parallel branch start.