Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
workflow-api plugin version 2.6.
For the given pipeline script, secondLevelNestedBranch1 and secondLevelNestedBranch2 parallel branches are nested inside nestedBranch.
There are missing StandardChunkVisitor.parallelEnd() and StandardChunkVisitor.parallelBranchEnd() events for nestedBranch. This causes computing incorrect DAG and status of individual branches. Blueocean extends StandardChunkVisitor to process events and create it's DAG.
node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' },secondLevelNestedBranch2: { echo 'secondLevelNestedBranch2' } } }, failFast: false } }
If there are only one parallel branches in nested parallel then no parallelEnd or parallelBranchEnd event is fired. See the script below:
node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' } } }, failFast: false } }
Attachments
Issue Links
- blocks
-
JENKINS-39847 Improved visualization for multiple "parallel"s within the same stage block
-
- Open
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Priority | Minor [ 4 ] | Major [ 3 ] |
Summary | Missing parallelBranchEnd and parallelEnd events if there are nested parallels | Missing StandardChunkVisitor.parallelBranchEnd() and parallelEnd() events if there are nested parallels |
Description |
For the given pipeline script, secondLevelNestedBranch1 and secondLevelNestedBranch2 parallel branches are nested inside nestedBranch. There are missing parallelEnd and parallelBranchEnd event for *nestedBranch*. This causes computing incorrect DAG and status of individual branches. {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' },secondLevelNestedBranch2: { echo 'secondLevelNestedBranch2' } } }, failFast: false } } {code} If there are only one parallel branches in nested parallel then no parallelEnd or parallelBranchEnd event is fired. See the script below: {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' } } }, failFast: false } } {code} |
For the given pipeline script, secondLevelNestedBranch1 and secondLevelNestedBranch2 parallel branches are nested inside nestedBranch. There are missing StandardChunkVisitor.parallelEnd() and StandardChunkVisitor.parallelBranchEnd() events for *nestedBranch*. This causes computing incorrect DAG and status of individual branches. Blueocean extends StandardChunkVisitor to process events and create it's DAG. {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' },secondLevelNestedBranch2: { echo 'secondLevelNestedBranch2' } } }, failFast: false } } {code} If there are only one parallel branches in nested parallel then no parallelEnd or parallelBranchEnd event is fired. See the script below: {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' } } }, failFast: false } } {code} |
Labels | blueocean |
Link | This issue blocks JENKINS-39847 [ JENKINS-39847 ] |
Description |
For the given pipeline script, secondLevelNestedBranch1 and secondLevelNestedBranch2 parallel branches are nested inside nestedBranch. There are missing StandardChunkVisitor.parallelEnd() and StandardChunkVisitor.parallelBranchEnd() events for *nestedBranch*. This causes computing incorrect DAG and status of individual branches. Blueocean extends StandardChunkVisitor to process events and create it's DAG. {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' },secondLevelNestedBranch2: { echo 'secondLevelNestedBranch2' } } }, failFast: false } } {code} If there are only one parallel branches in nested parallel then no parallelEnd or parallelBranchEnd event is fired. See the script below: {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' } } }, failFast: false } } {code} |
*workflow-api plugin version 2.6.* For the given pipeline script, secondLevelNestedBranch1 and secondLevelNestedBranch2 parallel branches are nested inside nestedBranch. There are missing StandardChunkVisitor.parallelEnd() and StandardChunkVisitor.parallelBranchEnd() events for *nestedBranch*. This causes computing incorrect DAG and status of individual branches. Blueocean extends StandardChunkVisitor to process events and create it's DAG. {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' },secondLevelNestedBranch2: { echo 'secondLevelNestedBranch2' } } }, failFast: false } } {code} If there are only one parallel branches in nested parallel then no parallelEnd or parallelBranchEnd event is fired. See the script below: {code} node { stage ('test') { echo ('Testing'); parallel nestedBranch: { echo 'nested Branch' stage('nestedBranchStage') { echo 'running nestedBranchStage' parallel secondLevelNestedBranch1: { echo 'secondLevelNestedBranch1' } } }, failFast: false } } {code} |
Assignee | Sam Van Oort [ svanoort ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Closed [ 6 ] |
Remote Link | This issue links to "CloudBees Internal OSS-1691 (Web Link)" [ 18610 ] |
Looks like, firing of parallel events are broken in general. Below script has two stages, each stage with couple parallels, parallelStart event is not called. The pipeline script below has s2.0 and s2.1 are still running so parallelBranchEnd is not fired, understandable, but I expect parallelStart should have been fired.
I collect branches in parallelStart and associate them with relevant stage, reset states etc. so this breaks association of parallel branches with the stage it belongs to. See https://issues.jenkins-ci.org/browse/JENKINS-39847