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

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • blueocean-plugin
    • None
    • Jenkins 2.177 BlueOcean 1.17.0

    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 -
            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:

            piratejohnny 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 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: piratejohnny 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 ]
            piratejohnny Jon B added a comment -

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

            piratejohnny Jon B added a comment - If I can find some time Ill create a repro case... 
            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.

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

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

            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.
            lixiaod2 Li Xiaodong added a comment - - edited

            Hello, I also get the same issue with version : Jenkins 2.235.1 and Blue Ocean 1.23.2. 

            Do we have plan to fix the issue? Since it has confused engineers in such case.

            -----------------

            Update 8/12/2020:

            The same issue still exists on our environment.

            Jenkins 2.235.1 Blue Ocean 1.24.3

            Could you please help to fix it?

             

            Here is what I captured when the job is running:

            Here is the status when the whole pipline finished, you can find Job_B marked as failed as expected in the end:

            Here is the pipline I use:

            lixiaod2 Li Xiaodong added a comment - - edited Hello, I also get the same issue with version : Jenkins 2.235.1 and Blue Ocean 1.23.2.  Do we have plan to fix the issue? Since it has confused engineers in such case. ----------------- Update 8/12/2020: The same issue still exists on our environment. Jenkins 2.235.1 Blue Ocean 1.24.3 Could you please help to fix it?   Here is what I captured when the job is running: Here is the status when the whole pipline finished, you can find Job_B marked as failed as expected in the end: Here is the pipline I use:
            lixiaod2 Li Xiaodong made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            lixiaod2 Li Xiaodong made changes -
            Attachment image-2020-12-08-14-31-40-794.png [ 53514 ]
            Attachment image-2020-12-08-14-31-01-514.png [ 53515 ]
            Attachment image-2020-12-08-14-30-11-451.png [ 53516 ]
            Attachment image-2020-12-08-14-28-11-665.png [ 53517 ]

            People

              Unassigned Unassigned
              piratejohnny Jon B
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: