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

Stage graph in Blue Ocean not showing all stages for large workflows

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Labels:
    • Environment:
      Jenkins: 2.138.1
      Blue Ocean: 1.8.3
      OS: RHEL7.2
      Browser: Google Chrome
    • Similar Issues:

      Description

      Stage graph in Blue Ocean not showing all stages for large workflows.
      As shown in below pipeline the last 2 parallel stages are missing in Blue Ocean noting that they were executed.

      you can find the code as per the attached.

       

       

        Attachments

          Issue Links

            Activity

            Hide
            vivek Vivek Pandey added a comment -

            Josh McDonald API to get all nodes is collection and is paginated. Is it happening due to pagination not handled correctly? 

             

            Show
            vivek Vivek Pandey added a comment - Josh McDonald  API to get all nodes is collection and is paginated. Is it happening due to pagination not handled correctly?   
            Hide
            sophistifunk Josh McDonald added a comment -

            Could be... Seems odd that it would be a problem on a graph with 20 nodes tho?

            Show
            sophistifunk Josh McDonald added a comment - Could be... Seems odd that it would be a problem on a graph with 20 nodes tho?
            Hide
            vivek Vivek Pandey added a comment -

            Elie Kassis can you provide reproducible Jenkinsfike to reproduce this issue?

            Show
            vivek Vivek Pandey added a comment - Elie Kassis can you provide reproducible Jenkinsfike to reproduce this issue?
            Hide
            ekassis Elie Kassis added a comment -

            Vivek Pandey I added the pipeline code in the description.

            Show
            ekassis Elie Kassis added a comment - Vivek Pandey I added the pipeline code in the description.
            Hide
            sophistifunk Josh McDonald added a comment -

            I'm going to look into this, see if there's an easy fix we can get in without changing a bunch of stuff that might have to be re-done shortly.

            Show
            sophistifunk Josh McDonald added a comment - I'm going to look into this, see if there's an easy fix we can get in without changing a bunch of stuff that might have to be re-done shortly.
            Hide
            sophistifunk Josh McDonald added a comment -

            I couldn't get the sample pipeline to run, kept getting weird syntax issues that make me think Jira has mangled it with some hidden characters or something. I cooked up a pipeline with > 100 nodes, and can't seem to trigger any bad behaviour: 

             

            Pipeline: https://gist.github.com/sophistifunk/000b5a14f31f51abb47be2830368c2b6

             

            SS: 

            Show
            sophistifunk Josh McDonald added a comment - I couldn't get the sample pipeline to run, kept getting weird syntax issues that make me think Jira has mangled it with some hidden characters or something. I cooked up a pipeline with > 100 nodes, and can't seem to trigger any bad behaviour:    Pipeline: https://gist.github.com/sophistifunk/000b5a14f31f51abb47be2830368c2b6   SS: 
            Hide
            ekassis Elie Kassis added a comment - - edited

            Josh McDonald, you can check the attached pipeline code on which we are facing the issue.

            Noting that in the example you provided there the no sequential stages inside the parallel nodes.

            In addition your code that launch parallel stages is totally different then the one we are using.
            Can you please tell us how using your way to have sequential stages inside parallel nodes?

            Show
            ekassis Elie Kassis added a comment - - edited Josh McDonald , you can check the attached pipeline code on which we are facing the issue. Noting that in the example you provided there the no sequential stages inside the parallel nodes. In addition your code that launch parallel stages is totally different then the one we are using. Can you please tell us how using your way to have sequential stages inside parallel nodes?
            Hide
            sophistifunk Josh McDonald added a comment -

            (meta: apparently I can comment here again. Weird.)

             

            I don't think this is related to paging, as this was causing issues in the past (JENKINS-41205) and the solution was to set the limit to 10,000 nodes.

            Not sure what else could be causing it, without a pipeline I can run that demonstrates the issue

            Show
            sophistifunk Josh McDonald added a comment - (meta: apparently I can comment here again. Weird.)   I don't think this is related to paging, as this was causing issues in the past ( JENKINS-41205 ) and the solution was to set the limit to 10,000 nodes. Not sure what else could be causing it, without a pipeline I can run that demonstrates the issue
            Hide
            ekassis Elie Kassis added a comment -

            Josh McDonald the pipeline is already attached, please use it

            Show
            ekassis Elie Kassis added a comment - Josh McDonald the pipeline is already attached, please use it
            Hide
            sophistifunk Josh McDonald added a comment -

            Updated pipeline script triggers the bad behaviour for me also, thanks. I'm looking into the cause.

            Show
            sophistifunk Josh McDonald added a comment - Updated pipeline script triggers the bad behaviour for me also, thanks. I'm looking into the cause.
            Hide
            sophistifunk Josh McDonald added a comment -

            Progress of a sort, it seems to be a backend issue, not a front-end issue like I first thought. Switching focus there

            Show
            sophistifunk Josh McDonald added a comment - Progress of a sort, it seems to be a backend issue, not a front-end issue like I first thought. Switching focus there
            Hide
            sophistifunk Josh McDonald added a comment -

            Righto, good progress, I've built a minimal pipeline that generates the issue reliably, and figured out the trigger: https://gist.github.com/sophistifunk/39cec79eb7d353b67bd70b75a61f95bc

             

            It seems that any time you have all of these conditions:

            1. A parallel stage
            2. The last parallel branch (in file order) is nested in a sequential wrapper, ie:
              stage('foo') { stages { /*...*/ } }
            1. The sequential wrapper only has one child stage

            Then the generated graph data is broken for nodes coming after the offending top-level stage.

             

            The problem is (almost certainly) in Blue Ocean server, or (far less likely) the Pipeline plugin. I'll find out which one and get a fix in, should be a small change once I identify the right spot.

            Show
            sophistifunk Josh McDonald added a comment - Righto, good progress, I've built a minimal pipeline that generates the issue reliably, and figured out the trigger: https://gist.github.com/sophistifunk/39cec79eb7d353b67bd70b75a61f95bc   It seems that any time you have all of these conditions: A parallel stage The last parallel branch (in file order) is nested in a sequential wrapper, ie: stage( 'foo' ) { stages { /*...*/ } } The sequential wrapper only has one child stage Then the generated graph data is broken for nodes coming after the offending top-level stage.   The problem is (almost certainly) in Blue Ocean server, or (far less likely) the Pipeline plugin. I'll find out which one and get a fix in, should be a small change once I identify the right spot.
            Hide
            sophistifunk Josh McDonald added a comment -

            PR (waiting on some dogfood issues for building) https://github.com/jenkinsci/blueocean-plugin/pull/1836

            Show
            sophistifunk Josh McDonald added a comment - PR (waiting on some dogfood issues for building)  https://github.com/jenkinsci/blueocean-plugin/pull/1836
            Hide
            sophistifunk Josh McDonald added a comment -

            Fixed in master @ e49553f1c8792e4e6f74285d3f8377a8f4ec3d99

            Show
            sophistifunk Josh McDonald added a comment - Fixed in master @ e49553f1c8792e4e6f74285d3f8377a8f4ec3d99
            Hide
            ekassis Elie Kassis added a comment -

            thank you Josh McDonald!

            Can you please help me with JENKINS-53735 since noone is replying ?

            Show
            ekassis Elie Kassis added a comment - thank you Josh McDonald ! Can you please help me with JENKINS-53735  since noone is replying ?

              People

              • Assignee:
                sophistifunk Josh McDonald
                Reporter:
                ekassis Elie Kassis
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: