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

parallel stages are displayed as passed even when they are not executed

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2

      Description

      In a pipeline with parallel stages, the parallel stages are shown as "passed" even when they are not executed.  If a preceding stage fails, the parallel stages are still shown as passed.

      Sample pipeline code to reproduce:

      pipeline {
        agent any
          stages {
            stage("first stage") {
              steps {sh "zsleep 5"}
            }
           stage('Three parallel stages with different execution time'){
             parallel{
               stage("One"){
                 steps {sh "sleep 5"}
               }
               stage("Two"){
                 steps {sh "sleep 10"}
                }
                stage("Three"){
                  steps {sh "sleep 15"}
                }
             }
           }
         }
      }
      

        Attachments

          Activity

          kongkoro Idikoro Eradiri created issue -
          kongkoro Idikoro Eradiri made changes -
          Field Original Value New Value
          Description In a pipeline with parallel stages, the parallel stages are shown as "passed" even when they are not executed.  If a preceding stage fails, the parallel stages are still shown as passed.

           !image-2017-11-02-07-19-27-955.png|thumbnail!
          {code:none}
          pipeline {
            agent any
              stages {
                stage("first stage") {
                  steps {sh "zsleep 5"}
                }
               stage('Three parallel stages with different execution time'){
          parallel{
          stage("One"){
          steps {sh "sleep 5"}
          }
          stage("Two"){
          steps {sh "sleep 10"}
          }
          stage("Three"){
          steps {sh "sleep 15"}
          }
          }
          }
          }
          }
          {code}
          In a pipeline with parallel stages, the parallel stages are shown as "passed" even when they are not executed.  If a preceding stage fails, the parallel stages are still shown as passed.

           !image-2017-11-02-07-19-27-955.png|thumbnail!

          Sample pipeline code to reproduce:
          {code:none}
          pipeline {
            agent any
              stages {
                stage("first stage") {
                  steps {sh "zsleep 5"}
                }
               stage('Three parallel stages with different execution time'){
          parallel{
          stage("One"){
          steps {sh "sleep 5"}
          }
          stage("Two"){
          steps {sh "sleep 10"}
          }
          stage("Three"){
          steps {sh "sleep 15"}
          }
          }
          }
          }
          }
          {code}
          kongkoro Idikoro Eradiri made changes -
          Summary parallel stages are shown as passed even when they are not executed parallel stages are displayed as passed even when they are not executed
          kongkoro Idikoro Eradiri made changes -
          Description In a pipeline with parallel stages, the parallel stages are shown as "passed" even when they are not executed.  If a preceding stage fails, the parallel stages are still shown as passed.

           !image-2017-11-02-07-19-27-955.png|thumbnail!

          Sample pipeline code to reproduce:
          {code:none}
          pipeline {
            agent any
              stages {
                stage("first stage") {
                  steps {sh "zsleep 5"}
                }
               stage('Three parallel stages with different execution time'){
          parallel{
          stage("One"){
          steps {sh "sleep 5"}
          }
          stage("Two"){
          steps {sh "sleep 10"}
          }
          stage("Three"){
          steps {sh "sleep 15"}
          }
          }
          }
          }
          }
          {code}
          In a pipeline with parallel stages, the parallel stages are shown as "passed" even when they are not executed.  If a preceding stage fails, the parallel stages are still shown as passed.

           !image-2017-11-02-07-19-27-955.png|thumbnail!

          Sample pipeline code to reproduce:
          {code:none}
          pipeline {
            agent any
              stages {
                stage("first stage") {
                  steps {sh "zsleep 5"}
                }
               stage('Three parallel stages with different execution time'){
                 parallel{
                   stage("One"){
                     steps {sh "sleep 5"}
                   }
                   stage("Two"){
                     steps {sh "sleep 10"}
                    }
                    stage("Three"){
                      steps {sh "sleep 15"}
                    }
                 }
               }
             }
          }
          {code}
          kongkoro Idikoro Eradiri made changes -
          Component/s pipeline-model-definition-plugin [ 21706 ]
          jamesdumay James Dumay made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          jamesdumay James Dumay made changes -
          Epic Link JENKINS-43953 [ 181485 ]
          Hide
          jamesdumay James Dumay added a comment -

          Vivek Pandey would you mind investigating please?

          Show
          jamesdumay James Dumay added a comment - Vivek Pandey would you mind investigating please?
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.4 - beta 2 [ 426 ]
          Assignee Vivek Pandey [ vivek ]
          Hide
          abayer Andrew Bayer added a comment -

          My guess here is that the parallel logic isn't looking for the stage status markers that Declarative adds?

          Show
          abayer Andrew Bayer added a comment - My guess here is that the parallel logic isn't looking for the stage status markers that Declarative adds?
          Hide
          abayer Andrew Bayer added a comment -

          FYI, PR up for Declarative at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/214 that verifies that we are properly applying skipped stage metadata to parallel stages. And we are, so this is something on the Blue Ocean side.

          Show
          abayer Andrew Bayer added a comment - FYI, PR up for Declarative at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/214 that verifies that we are properly applying skipped stage metadata to parallel stages. And we are, so this is something on the Blue Ocean side.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
          pipeline-model-definition/src/test/resources/parallelStagesHaveStatusAndPost.groovy
          pipeline-model-definition/src/test/resources/parallelStagesHaveStatusWhenSkipped.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/deb55742bb3313daa71ced75dcb51d08ce8610bc
          Log:
          JENKINS-47783 Verify skipped stage status for parallel stages

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/parallelStagesHaveStatusAndPost.groovy pipeline-model-definition/src/test/resources/parallelStagesHaveStatusWhenSkipped.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/deb55742bb3313daa71ced75dcb51d08ce8610bc Log: JENKINS-47783 Verify skipped stage status for parallel stages
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
          pipeline-model-definition/src/test/resources/parallelStagesHaveStatusAndPost.groovy
          pipeline-model-definition/src/test/resources/parallelStagesHaveStatusWhenSkipped.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c643a64165d5b7bed0dfa8a53cdda58ed0bf2a58
          Log:
          Merge pull request #214 from abayer/jenkins-47783

          JENKINS-47783 Verify skipped stage status for parallel stages

          Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/f5672618087f...c643a64165d5

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/parallelStagesHaveStatusAndPost.groovy pipeline-model-definition/src/test/resources/parallelStagesHaveStatusWhenSkipped.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c643a64165d5b7bed0dfa8a53cdda58ed0bf2a58 Log: Merge pull request #214 from abayer/jenkins-47783 JENKINS-47783 Verify skipped stage status for parallel stages Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/f5672618087f...c643a64165d5
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.4 - beta 2 [ 426 ] Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2 [ 416, 426 ]
          Hide
          kshultz Karl Shultz added a comment -

          Testing Notes:

          • Unit tests were included as part of the PR.
          • And they were made super easy to find by the use of the @Issue annotation.
          Show
          kshultz Karl Shultz added a comment - Testing Notes: Unit tests were included as part of the PR . And they were made super easy to find by the use of the @Issue annotation.
          kshultz Karl Shultz made changes -
          Labels testing-notes-reviewed
          abayer Andrew Bayer made changes -
          Component/s pipeline-model-definition-plugin [ 21706 ]
          vivek Vivek Pandey made changes -
          Assignee Vivek Pandey [ vivek ] Andrew Bayer [ abayer ]
          vivek Vivek Pandey made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          vivek Vivek Pandey added a comment -
          Show
          vivek Vivek Pandey added a comment - Looks like Andrew Bayer fixed it as part of PR https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/214 .
          vivek Vivek Pandey made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          kongkoro Idikoro Eradiri added a comment -

          Vivek Pandey James Dumay Is this fixed? I'm currenlty on Jenkins 2.89.4 and running blueocean 1.4.2 and I am still seeing the same issue. The sample pipeline script I posted above still shows parallel stages as passed even though they did not execute.

          Show
          kongkoro Idikoro Eradiri added a comment - Vivek Pandey James Dumay Is this fixed? I'm currenlty on Jenkins 2.89.4 and running blueocean 1.4.2 and I am still seeing the same issue. The sample pipeline script I posted above still shows parallel stages as passed even though they did not execute.
          kongkoro Idikoro Eradiri made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          kongkoro Idikoro Eradiri added a comment -

          confirmed it's fixed in 1.5.0

          Show
          kongkoro Idikoro Eradiri added a comment - confirmed it's fixed in 1.5.0
          kongkoro Idikoro Eradiri made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          kshultz Karl Shultz added a comment -

          Idikoro Eradiri, many thanks for circling back and confirming that it's been fixed! Much appreciated.

          Show
          kshultz Karl Shultz added a comment - Idikoro Eradiri , many thanks for circling back and confirming that it's been fixed! Much appreciated.
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              kongkoro Idikoro Eradiri
            • Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: