• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • blueocean-plugin
    • None
    • Jenkins ver. 2.107.1
      Blue Ocean 1.4.2

      If a nested parallel stage fails, it is not correctly indicated in blue ocean. Often failing stages are marked green. Sometimes successful stages are marked red, if another stage is failing.

      The following pipeline gives an example.

      pipeline {
          agent any
          options {
              timeout(time: 120, unit: 'MINUTES')
              timestamps()
              skipDefaultCheckout()
          }
          stages {
              stage('Nested Parallel Stage') {
                  parallel {
                      stage("Parallel Stage") { 
                          steps { 
                              script {
                                def parallelTasks = [:]
                              
                                  parallelTasks['Successful Task 1'] = {
                                    echo "Success"
                                }
                                
                                parallelTasks['Failing Task'] = {
                                    sh "exit 1"
                                }
                                
                                parallelTasks['Successful Task'] = {
                                    echo "Success"
                                }
                                
                                parallel parallelTasks
                              } 
                          } 
                      }
                      stage("Stage") {
                          steps { 
                              echo "Stage"    
                          }
                      }
                  }
              }
          }
      }

       I expect that the parallel closure  'Failing Task' is marked red, all others should be marked green.

      However, the result looks as follows:

       

          [JENKINS-50532] Failing nested parallel stages are marked green

          Phil Segal added a comment -

          Did you find any workaround for this? We are trying to use nested parallels and our statuses are dodgy too.

          Phil Segal added a comment - Did you find any workaround for this? We are trying to use nested parallels and our statuses are dodgy too.

          philsegal No. Unfortunately not. This is also still an issue for us.

          Daniel Kurzynski added a comment - philsegal No. Unfortunately not. This is also still an issue for us.

          Daniel Kurzynski added a comment - - edited

          I could identify the issue and could fix it:

          The stacks containing the branch start and end nodes had a different order. So the start node which generated the label and steps was associated with a wrong end node which is used to find out if the node/stage was successful.  

          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeGraphVisitor.java#L321

          I will provide a pull request.

          Daniel Kurzynski added a comment - - edited I could identify the issue and could fix it: The stacks containing the branch start and end nodes had a different order. So the start node which generated the label and steps was associated with a wrong end node which is used to find out if the node/stage was successful.   https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeGraphVisitor.java#L321 I will provide a pull request.

          Phil Segal added a comment -

          Great news kurzy. Looking forward to your fix!

           

          Phil Segal added a comment - Great news kurzy . Looking forward to your fix!  

          Daniel Kurzynski added a comment - Pull Request is open: https://github.com/jenkinsci/blueocean-plugin/pull/1886

          Hari added a comment -

          What version was this fixed in because I'm still seeing this behaviour of showing parallel stages as green when they've failed and they only update to red once all adjacent parallel stages have failed.

          I'm seeing this with Blue Ocean 1.24.6 on Jenkins 2.319.

          Hari added a comment - What version was this fixed in because I'm still seeing this behaviour of showing parallel stages as green when they've failed and they only update to red once all adjacent parallel stages have failed. I'm seeing this with Blue Ocean 1.24.6 on Jenkins 2.319.

            olamy Olivier Lamy
            kurzy Daniel Kurzynski
            Votes:
            14 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: