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-10-17 at 10.08.17.png
          Screenshot 2019-10-17 at 10.08.17.png
          16 kB
        2. screenshot_2019-06-18_at_14.52.11.png
          screenshot_2019-06-18_at_14.52.11.png
          116 kB
        3. jenkins_build2.png
          jenkins_build2.png
          96 kB
        4. jenkins_build2.mov
          1.07 MB
        5. jenkins_build1.png
          jenkins_build1.png
          89 kB
        6. jenkins_build1.mov
          970 kB

          Issue Links

            Activity

            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 
            Hide
            ndevenish Nick Devenish added a comment - - edited

            I'm seeing this now still, Blue Ocean 1.24.4, Jenkins 2.277.1 (docker jenkinsci/blueocean ). The previous run failed on this stage, but otherwise the flow structure/when conditions haven't changed since the last run - but I did remove the agent specifier from two incorrectly applied stages:

              parallel {
                  stage("Linux") {
                      agent { label 'linux' }
                      stages {
                          stage("Build") {
            -                 agent any
                              ...
            
                          }
                          stage("Test") {
            -                 agent none
                              ...
                          }
                      }
                  }
              }
            

            It actually started showing the output but then on a refresh disappeared back down to "Waiting for Run to Start". This build then went on to fail, but it also didn't work on a subsequent run so maybe it's not related to the agent changes. (Edit: To say that it's all obviously showing in the classic "console log" fine)

             

            Edit 2: Again to say that today with my test builds it persists - but it isn't just blank; before starting the job (waiting for executor) the "current stage" indicator is on the wrong step. Then, when it starts, it has the first step fine "checking out from source control". Clicking on a different node then back to the actual executing one replaces even that one step with "waiting for run to start"

            Show
            ndevenish Nick Devenish added a comment - - edited I'm seeing this now still, Blue Ocean 1.24.4, Jenkins 2.277.1 (docker jenkinsci/blueocean ). The previous run failed on this stage, but otherwise the flow structure/when conditions haven't changed since the last run - but I did remove the agent specifier from two incorrectly applied stages: parallel { stage("Linux") { agent { label 'linux' } stages { stage("Build") { - agent any ... } stage("Test") { - agent none ... } } } } It actually started showing the output but then on a refresh disappeared back down to "Waiting for Run to Start". This build then went on to fail, but it also didn't work on a subsequent run so maybe it's not related to the agent changes. (Edit: To say that it's all obviously showing in the classic "console log" fine)   Edit 2: Again to say that today with my test builds it persists - but it isn't just blank; before starting the job (waiting for executor) the "current stage" indicator is on the wrong step. Then, when it starts, it has the first step fine "checking out from source control". Clicking on a different node then back to the actual executing one replaces even that one step with "waiting for run to start"

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pracucci Marco Pracucci
              Votes:
              36 Vote for this issue
              Watchers:
              51 Start watching this issue

                Dates

                Created:
                Updated: