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

Queued status for pipelines not reported correctly

    XMLWordPrintable

    Details

    • Epic Link:
    • Sprint:
      Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2
    • Similar Issues:

      Description

      Problem
      Pipelines that are queued are reported as running

      Steps to reproduce

      1. Setup the app store demo pipeline https://github.com/i386/app-store-demo
      2. disable all executors
      3. run the master branch
      4. The run is reported in Blue Ocean as running rather than queued

      Notes
      Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

      If no nodes in pipeline are running then run state is QUEUED as it is indeed. If at least one of the node is in running state Run state is RUNNING.

      Its important to know that we do some things at the Pipeline run level to calculate the "input" state of a Pipeline run in Blue Ocean (I think we search for the InputAction on the run and if there are any then we say that the state is "input")

        Attachments

        1. blue.png
          blue.png
          205 kB
        2. queue.png
          queue.png
          45 kB

          Issue Links

            Activity

            jamesdumay James Dumay created issue -
            jamesdumay James Dumay made changes -
            Field Original Value New Value
            Epic Link JENKINS-35759 [ 171771 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The pipeline is reported in Blue Ocean as running rather than queued

            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The pipeline is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2 [ 326 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The pipeline is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED
            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The pipeline is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            Priority Minor [ 4 ] Major [ 3 ]
            Assignee Vivek Pandey [ vivek ]
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The pipeline is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If atleast one of the node is in running state Run state is RUNNING.
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2 [ 326 ] Blue Ocean 1.2-beta2 [ 341 ]
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta2 [ 341 ] Blue Ocean 1.2-beta1 [ 336 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If atleast one of the node is in running state Run state is RUNNING.
            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline https://github.com/i386/app-store-demo
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If atleast one of the node is in running state Run state is RUNNING.
            jamesdumay James Dumay made changes -
            Assignee Vivek Pandey [ vivek ] Andrew Bayer [ abayer ]
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline https://github.com/i386/app-store-demo
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If atleast one of the node is in running state Run state is RUNNING.
            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline https://github.com/i386/app-store-demo
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If at least one of the node is in running state Run state is RUNNING.
            jamesdumay James Dumay made changes -
            Description *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline https://github.com/i386/app-store-demo
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If at least one of the node is in running state Run state is RUNNING.
            *Problem*
            Pipelines that are queued are reported as running

            *Steps to reproduce*
            # Setup the app store demo pipeline https://github.com/i386/app-store-demo
            # disable all executors
            # run the master branch
            # The run is reported in Blue Ocean as running rather than queued

            *Notes*
            Pipeline queue item is queued but the run is reported as running BlueRunState.RUNNING when it should be reported as BlueRunState.QUEUED

            If no nodes in pipeline are running then run state is QUEUED as it is indeed. If at least one of the node is in running state Run state is RUNNING.

            Its important to know that we do some things at the Pipeline run level to calculate the "input" state of a Pipeline run in Blue Ocean (I think we search for the InputAction on the run and if there are any then we say that the state is "input")
            Hide
            abayer Andrew Bayer added a comment -

            So here's how I'd describe the rules here:

            • If the Pipeline run itself is queued, well, that's self explanatory. This could occur if, say, disableConcurrentBuilds is true.
            • If the Pipeline run is running and the flow graph contains no "open" node blocks (i.e., no node step executions at all or all of them are complete), then the run is running - this could be the case if the Pipeline is waiting for input, waiting for a downstream build, etc, and is not in a node block.
            • If the Pipeline run's flow graph has one or more "open" node blocks, i.e., not-yet-complete node steps, that are still in the queue, and no "open" node blocks that are actively running, then the run is queued.
            • If any "open" node blocks in the Pipeline run's flow graph are actively running, then the run is running.
            Show
            abayer Andrew Bayer added a comment - So here's how I'd describe the rules here: If the Pipeline run itself is queued, well, that's self explanatory. This could occur if, say, disableConcurrentBuilds is true. If the Pipeline run is running and the flow graph contains no "open" node blocks (i.e., no node step executions at all or all of them are complete), then the run is running - this could be the case if the Pipeline is waiting for input, waiting for a downstream build, etc, and is not in a node block. If the Pipeline run's flow graph has one or more "open" node blocks, i.e., not-yet-complete node steps, that are still in the queue, and no "open" node blocks that are actively running, then the run is queued. If any "open" node blocks in the Pipeline run's flow graph are actively running, then the run is running.
            Hide
            jamesdumay James Dumay added a comment -
            Show
            jamesdumay James Dumay added a comment - Andrew Bayer yes
            jamesdumay James Dumay made changes -
            Link This issue relates to JENKINS-41344 [ JENKINS-41344 ]
            Hide
            abayer Andrew Bayer added a comment -

            A question - this is talking about a single running/queued status for the entire Pipeline run, right? Just want to make sure.

            Show
            abayer Andrew Bayer added a comment - A question - this is talking about a single running/queued status for the entire Pipeline run, right? Just want to make sure.
            Hide
            jamesdumay James Dumay added a comment - - edited

            Andrew Bayer key classes to look at:

            • PipelineRunImpl - implementation for the Pipeline Run in BO rest (includes Input State calculation)
            • FlowNodeWrapper - internal API for wrapping flownodes into useful information
            • PipelineNodeGraphVisitor - this uses bismuth to produce FlowNodeWrapper's
            Show
            jamesdumay James Dumay added a comment - - edited Andrew Bayer key classes to look at: PipelineRunImpl - implementation for the Pipeline Run in BO rest (includes Input State calculation) FlowNodeWrapper - internal API for wrapping flownodes into useful information PipelineNodeGraphVisitor - this uses bismuth to produce FlowNodeWrapper 's
            abayer Andrew Bayer made changes -
            Link This issue relates to JENKINS-44981 [ JENKINS-44981 ]
            Hide
            abayer Andrew Bayer added a comment -

            PR up at https://github.com/jenkinsci/blueocean-plugin/pull/1184 - originally thought of it as JENKINS-44981, but I've realized that it should actually be solving this issue directly, while it'll take some more UI-side changes to solve JENKINS-44981.

            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/blueocean-plugin/pull/1184 - originally thought of it as JENKINS-44981 , but I've realized that it should actually be solving this issue directly, while it'll take some more UI-side changes to solve JENKINS-44981 .
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "Blue Ocean PR #1184 (Web Link)" [ 17172 ]
            Hide
            abayer Andrew Bayer added a comment -

            James Dumay So I don't actually know what a queued run should look like. =)

            Show
            abayer Andrew Bayer added a comment - James Dumay So I don't actually know what a queued run should look like. =)
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta1 [ 336 ] Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2 [ 336, 341 ]
            michaelneale Michael Neale made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2 [ 336, 341 ] Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3 [ 336, 341, 346 ]
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3 [ 336, 341, 346 ] Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4 [ 336, 341, 346, 361 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/actions/QueueItemAction.java
            http://jenkins-ci.org/commit/workflow-api-plugin/41c239f904847f9a7fbdd46fc3502e35c21cdb19
            Log:
            Merge pull request #42 from abayer/jenkins-44981

            JENKINS-44636 Action for tracking node block queued/running status

            Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/02c14940016a...41c239f90484

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/actions/QueueItemAction.java http://jenkins-ci.org/commit/workflow-api-plugin/41c239f904847f9a7fbdd46fc3502e35c21cdb19 Log: Merge pull request #42 from abayer/jenkins-44981 JENKINS-44636 Action for tracking node block queued/running status Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/02c14940016a...41c239f90484
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/GenericStatus.java
            src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTiming.java
            src/test/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTimingTest.java
            http://jenkins-ci.org/commit/pipeline-graph-analysis-plugin/42960f027a0685b26cbb9cf37034c16358777ad1
            Log:
            Merge pull request #11 from abayer/jenkins-44981

            JENKINS-44636 Add GenericStatus.QUEUED and related logic

            Compare: https://github.com/jenkinsci/pipeline-graph-analysis-plugin/compare/b18e165c0ac8...42960f027a06

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/GenericStatus.java src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTiming.java src/test/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTimingTest.java http://jenkins-ci.org/commit/pipeline-graph-analysis-plugin/42960f027a0685b26cbb9cf37034c16358777ad1 Log: Merge pull request #11 from abayer/jenkins-44981 JENKINS-44636 Add GenericStatus.QUEUED and related logic Compare: https://github.com/jenkinsci/pipeline-graph-analysis-plugin/compare/b18e165c0ac8...42960f027a06
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4 [ 336, 341, 346, 361 ] Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2-beta5 [ 336, 341, 346, 361, 376 ]
            Hide
            jamesdumay James Dumay added a comment -

            Andrew Bayer I need to do some testing of this today to see if this goes into 1.2 or not. Will report back on the PR.

            Show
            jamesdumay James Dumay added a comment - Andrew Bayer I need to do some testing of this today to see if this goes into 1.2 or not. Will report back on the PR.
            michaelneale Michael Neale made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                jamesdumay James Dumay
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: