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

BlueOcean steps do not appear green when they were successful when using parallel stages while still running

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.177 BlueOcean 1.17.0
    • Similar Issues:

      Description

      In the sample screenshot below, you can see how there's a step which completed called "Test DB" which is rendered as an empty circle despite the fact that the step passed successfully.

      The good news is that after the entire pipeline completes, the "Test DB" circle does appear as a green dot with a white checkmark.

        Attachments

          Issue Links

            Activity

            piratejohnny Jon B created issue -
            piratejohnny Jon B made changes -
            Field Original Value New Value
            Summary BlueOcean steps do not appear green when they were successful when using parallel stages BlueOcean steps do not appear green when they were successful when using parallel stages while still running
            dnusbaum Devin Nusbaum made changes -
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Spent a bit of time trying to reproduce this in case it was related to my changes for JENKINS-39203, but was not able to do so. Here is the Pipeline I was using:

            pipeline {
                agent any
                stages {
                    stage('before') {
                        steps {
                            echo 'before'
                        }
                    }
                    stage("parallel") {
                        parallel {
                            stage("simple") {
                                stages {
                                    stage ("simple-inner?") {
                                        steps {
                                            echo 'simple-inner?'
                                            sleep 1
                                        }
                                    }
                                }
                            }
                            stage("sequential") {
                                stages {
                                    stage("sequential-1") {
                                       steps {
                                            echo 'sequential-1'
                                            sleep 1
                                        }
                                    }
                                    stage("sequential-2") {
                                       steps {
                                            echo 'sequential-2'
                                            sleep 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                    stage('after') {
                        parallel {
                            stage('after-1') {
                                steps {
                                    sleep 60
                                }       
                            }
                            stage('after-2') {
                                steps {
                                    echo 'after-2'
                                }       
                            }
                        }
                    }
                }
            }
            

            And here is what it looked like:

            Jon B If you can figure out how to reproduce the problem with tweaks to my basic Pipeline here, that would be helpful. From what I can tell, it looks like what you are reporting might be a dupe of JENKINS-53816, see in particular this comment which notes some problems in this area in Blue Ocean 1.17.0.

            Show
            dnusbaum Devin Nusbaum added a comment - Spent a bit of time trying to reproduce this in case it was related to my changes for JENKINS-39203 , but was not able to do so. Here is the Pipeline I was using: pipeline { agent any stages { stage( 'before' ) { steps { echo 'before' } } stage( "parallel" ) { parallel { stage( "simple" ) { stages { stage ( "simple- inner ?" ) { steps { echo 'simple- inner ?' sleep 1 } } } } stage( "sequential" ) { stages { stage( "sequential-1" ) { steps { echo 'sequential-1' sleep 1 } } stage( "sequential-2" ) { steps { echo 'sequential-2' sleep 1 } } } } } } stage( 'after' ) { parallel { stage( 'after-1' ) { steps { sleep 60 } } stage( 'after-2' ) { steps { echo 'after-2' } } } } } } And here is what it looked like: Jon B If you can figure out how to reproduce the problem with tweaks to my basic Pipeline here, that would be helpful. From what I can tell, it looks like what you are reporting might be a dupe of JENKINS-53816 , see in particular this comment which notes some problems in this area in Blue Ocean 1.17.0.
            dnusbaum Devin Nusbaum made changes -
            Link This issue relates to JENKINS-53816 [ JENKINS-53816 ]
            Hide
            piratejohnny Jon B added a comment -

            If I can find some time Ill create a repro case... 

            Show
            piratejohnny Jon B added a comment - If I can find some time Ill create a repro case... 
            Hide
            piratejohnny Jon B added a comment -

            Here's a clue: I use declarative jenkins pipelines.. however, the "testing" stage calls to a script{} block and inside of there is some groovy scripting that uses the "parallel" command in order to fire a bunch of jobs in parallel.

            The defect appears to be that the jenkins declarative parallel build steps dont know how to play nice with groovy scripting that calls for parallel jobs to run.

            Interesting that usually when the pipeline is completely finished that things tend to render correctly.. they just dont render correctly while its running causing confusion to the developers who are trying to make sense of whats going on.

            Show
            piratejohnny Jon B added a comment - Here's a clue: I use declarative jenkins pipelines.. however, the "testing" stage calls to a script{} block and inside of there is some groovy scripting that uses the "parallel" command in order to fire a bunch of jobs in parallel. The defect appears to be that the jenkins declarative parallel build steps dont know how to play nice with groovy scripting that calls for parallel jobs to run. Interesting that usually when the pipeline is completely finished that things tend to render correctly.. they just dont render correctly while its running causing confusion to the developers who are trying to make sense of whats going on.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            the "testing" stage calls to a script{} block and inside of there is some groovy scripting that uses the "parallel" command in order to fire a bunch of jobs in parallel

            Ah ok, yeah running stages/parallel blocks inside of script blocks in a Declarative Pipeline generally breaks the visualization, so I'm surprised that it ends up working once the build is complete. Fixing this is probably nontrivial, and might require some substantial changes to the graph generation code in Blue Ocean.

            Show
            dnusbaum Devin Nusbaum added a comment - the "testing" stage calls to a script{} block and inside of there is some groovy scripting that uses the "parallel" command in order to fire a bunch of jobs in parallel Ah ok, yeah running stages/parallel blocks inside of script blocks in a Declarative Pipeline generally breaks the visualization, so I'm surprised that it ends up working once the build is complete. Fixing this is probably nontrivial, and might require some substantial changes to the graph generation code in Blue Ocean.
            Hide
            piratejohnny Jon B added a comment - - edited

            We have a massive jenkins installation and the overwhelming majority of our jenkins pipeline users use declarative scripts and then they use script blocks to call out to subfunctions that often have their own parallel steps. In these cases, the UI rendering is messed up.

            From my vantage point, you absolutely need to change that graph algo to be able to render correctly when declarative and scripted parallel steps are mixed.

            Show
            piratejohnny Jon B added a comment - - edited We have a massive jenkins installation and the overwhelming majority of our jenkins pipeline users use declarative scripts and then they use script blocks to call out to subfunctions that often have their own parallel steps. In these cases, the UI rendering is messed up. From my vantage point, you absolutely need to change that graph algo to be able to render correctly when declarative and scripted parallel steps are mixed.

              People

              • Assignee:
                Unassigned
                Reporter:
                piratejohnny Jon B
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: