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

Single running parallel branch missing parent parallel block.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      When there is a single, running branch of a pipeline, the StandardChunkVisitor doesn't trigger `parallelEnd` or `parallelStart` for it's parent block.

      This works:

      node {
          parallel([
              "A": {
                  stage("Build") {
                      echo("Build A")
                  }
                  stage("Test") {
                      parallel([
                          "A1" : {
                             echo("Test A1")
                          },
                          "A2" : {
                             echo("Test A2")
                          }
                      ])
                  }
              },
              "B": {
                  stage("Build") {
                      echo("Build B")
                  }
                  parallel([
                      "B1" : {
                         echo("Test B1")
                         sleep(60)
                      },
                      "B2" : {
                         echo("Test B2")
                         sleep(60;
                      }
                  ])
              }
          ])
      } 
      

      We get `A<-A1` and `B<-B1,B2`.

      This doesn't:

      node {
          parallel([
              "A": {
                  stage("Build") {
                      echo("Build A")
                  }
                  stage("Test") {
                      parallel([
                          "A1" : {
                             echo("Test A1")
                          },
                          "A2" : {
                             echo("Test A2")
                          }
                      ])
                  }
              },
              "B": {
                  stage("Build") {
                      echo("Build B")
                  }
                  parallel([
                      "B1" : {
                         echo("Test B1")
                         sleep(60)
                      },
                  ])
              }
          ])
      } 
      

      (`B1` becomes a sibling of `A` - `B` is not listed in the graph until the build completes).

      It feels like this would have been reported already, but I can't find an issue - so raising just in case.

      Update:
      More specifically, in the second Pipeline - `parallelBranchEnd/parallelBranchStart` don't get called for `B` whilst the Pipeline is still executing. This is not the case once the pipeline is finished or in the first example.

            Unassigned Unassigned
            canuck1987 Tim Brown
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: