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

Missing StandardChunkVisitor.parallelBranchEnd() and parallelEnd() events if there are nested parallels

    XMLWordPrintable

    Details

    • Similar Issues:

      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

            Activity

            vivek Vivek Pandey created issue -
            vivek Vivek Pandey made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            vivek Vivek Pandey made changes -
            Summary Missing parallelBranchEnd and parallelEnd events if there are nested parallels Missing StandardChunkVisitor.parallelBranchEnd() and parallelEnd() events if there are nested parallels
            vivek Vivek Pandey made changes -
            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}
            jamesdumay James Dumay made changes -
            Labels blueocean
            vivek Vivek Pandey made changes -
            Link This issue blocks JENKINS-39847 [ JENKINS-39847 ]
            vivek Vivek Pandey made changes -
            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}
            svanoort Sam Van Oort made changes -
            Assignee Sam Van Oort [ svanoort ]
            svanoort Sam Van Oort made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            svanoort Sam Van Oort made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            svanoort Sam Van Oort made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Closed [ 6 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1691 (Web Link)" [ 18610 ]

              People

              Assignee:
              svanoort Sam Van Oort
              Reporter:
              vivek Vivek Pandey
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: