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

BlueOcean UI stuck in "Waiting for run to start"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.180, BlueOcean 1.17.0
    • Similar Issues:
    • Released As:
      blue-ocean 1.19.0

      Description

      We recently upgraded BlueOcean from 1.16.0 to 1.17.0 and we started observing a weird behaviour in the BlueOcean pipeline UI.

      Frequently (not always) the pipeline UI stops updating the progress while the pipeline is running and the UI is stuck at "Waiting for run to start" (see attached screenshot). When it happens, it does not recover until the pipeline execution completes: once completed, the UI is correctly updated (all steps are green).

      We've also noticed that - when happens - the underlying requests sent by the browser to the endpoint https://jenkins.DOMAIN/blue/rest/organizations/jenkins/pipelines/PROJECT/branches/master/runs/ID/nodes/ID/steps/ always return an empty array "[]" instead of the expected array of steps. On the contrary, during the execution of the pipeline, if we look at the "Console Output" (old Jenkins UI) we can correctly see the progress of the pipeline even when the BlueOcean UI is stuck at "Waiting for run to start".

      This issue looks disappear if we rollback all BlueOcean plugins from 1.17.0 to 1.16.0.

        Attachments

        1. screenshot_2019-06-18_at_14.52.11.png
          screenshot_2019-06-18_at_14.52.11.png
          116 kB
        2. Screenshot 2019-10-17 at 10.08.17.png
          Screenshot 2019-10-17 at 10.08.17.png
          16 kB
        3. jenkins_build1.png
          jenkins_build1.png
          89 kB
        4. jenkins_build1.mov
          970 kB
        5. jenkins_build2.png
          jenkins_build2.png
          96 kB
        6. jenkins_build2.mov
          1.07 MB

          Issue Links

            Activity

            Hide
            esurys Ernest Suryś added a comment - - edited

            Same here, BO: 1.24.2, Jenkins: 2.492.2

            pipeline {
              agent any
              parameters {
                choice(name: 'BuildType', choices: ['Release', 'Develop'], description: ".")
                text(name: 'Comments', defaultValue: '', description: 'Additional information about this build.')
              }
              stages {
                stage('Check Unity version') {
                  steps {
                    sh '''
                      command
                    '''
                  }
                }
                stage('Build') {
                  environment {
                    PROJECT_NAME = sh(script:'basename $(git config --get remote.origin.url) .git', returnStdout: true).trim()
                    DATE = sh(script:'date +%Y%m%d', returnStdout: true).trim()
                    BUILD_DIR = ""
                  }
                  parallel {
                    stage('Release') {
                      when { expression { params.BuildType == 'Release' } }
                      steps {
                        sh '''
                          command
                        '''
                      }
                    }
                    stage('Develop') {
                      when { expression { params.BuildType == 'Develop' } }
                      steps {
                        sh '''
                          command
                        '''
                      }
                    }
                  }
                }
              }
            }
            
            Show
            esurys Ernest Suryś added a comment - - edited Same here, BO: 1.24.2, Jenkins: 2.492.2 pipeline { agent any parameters { choice(name: 'BuildType' , choices: [ 'Release' , 'Develop' ], description: "." ) text(name: 'Comments' , defaultValue: '', description: ' Additional information about this build.') } stages { stage( 'Check Unity version' ) { steps { sh ''' command ''' } } stage( 'Build' ) { environment { PROJECT_NAME = sh(script: 'basename $(git config --get remote.origin.url) .git' , returnStdout: true ).trim() DATE = sh(script: 'date +%Y%m%d' , returnStdout: true ).trim() BUILD_DIR = "" } parallel { stage( 'Release' ) { when { expression { params.BuildType == 'Release' } } steps { sh ''' command ''' } } stage( 'Develop' ) { when { expression { params.BuildType == 'Develop' } } steps { sh ''' command ''' } } } } } }
            Hide
            dindurthy Dharma Indurthy added a comment -

            Did some experimenting. Pretty sure this happens with parallel stages and at least one having a when expression. Removing the whens or linearizing restores real-time logging.

            Show
            dindurthy Dharma Indurthy added a comment - Did some experimenting. Pretty sure this happens with parallel stages and at least one having a when expression. Removing the whens or linearizing restores real-time logging.
            Hide
            borisivan boris ivan added a comment -

            Since this is a bug and not an enhancement, will it be possible to get an update on this? Affecting so many people.

            Show
            borisivan boris ivan added a comment - Since this is a bug and not an enhancement, will it be possible to get an update on this? Affecting so many people.
            Hide
            zhaxmdi0 DP added a comment - - edited

            In terms of the "Waiting for run to start" message in a parallel block, the issue is still reproducible with Blue Ocean 1.24.3.

            As a workaround, I've found that adding a new dummy stage at the end of the parallel block will allow the logs of the other stages in the block to be viewed. The name of this extra stage doesn't matter, but it has to be defined as the last stage in the parallel block.

            For more details, see my comment on JENKINS-48879.

             

            I've also seen the "Waiting for run to start" message in single stages (without a parallel block), usually when the stages in the pipeline have changed (eg. after modifying the Jenkinsfile to add a new stage). In this case, I've found that the details of all stages will be shown when the pipeline completes; subsequent pipeline runs will then show the stages and their logs correctly. I'm not aware of a workaround for this case.

            Show
            zhaxmdi0 DP added a comment - - edited In terms of the "Waiting for run to start" message in a parallel block, the issue is still reproducible with Blue Ocean 1.24.3. As a workaround, I've found that adding a new dummy stage at the end of the parallel block will allow the logs of the other stages in the block to be viewed. The name of this extra stage doesn't matter, but it has to be defined as the last stage in the parallel block. For more details, see my comment on JENKINS-48879 .   I've also seen the "Waiting for run to start" message in single stages (without a parallel block), usually when the stages in the pipeline have changed (eg. after modifying the Jenkinsfile to add a new stage). In this case, I've found that the details of all stages will be shown when the pipeline completes; subsequent pipeline runs will then show the stages and their logs correctly. I'm not aware of a workaround for this case.
            Hide
            ryemelianov Ruslan Yemelianov added a comment -

            Hi, i'm seeing the same issue, in console log step is executing and in blueocean i see "Waiting for run to start" message, 2nd step in a parallel block
            Jenkins: 2.263.2
            Blueocean:  1.24.0 

            Show
            ryemelianov Ruslan Yemelianov added a comment - Hi, i'm seeing the same issue, in console log step is executing and in blueocean i see "Waiting for run to start" message, 2nd step in a parallel block Jenkins: 2.263.2 Blueocean:  1.24.0 

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pracucci Marco Pracucci
              Votes:
              35 Vote for this issue
              Watchers:
              48 Start watching this issue

                Dates

                Created:
                Updated: