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

          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?
          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
          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.
          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 .
          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.
          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
          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.

            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: