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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • blueocean-plugin
    • Jenkins: 2.138.1
      Blue Ocean: 1.8.3
      OS: RHEL7.2
      Browser: Google Chrome

    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

            vivek Vivek Pandey added a comment -

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

             

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

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

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

            ekassis can you provide reproducible Jenkinsfike to reproduce this issue?

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

            vivek I added the pipeline code in the description.

            ekassis Elie Kassis added a comment - vivek I added the pipeline code in the description.
            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.

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

            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: 
            ekassis Elie Kassis added a comment - - edited

            sophistifunk, 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?

            ekassis Elie Kassis added a comment - - edited sophistifunk , 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?
            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

            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
            ekassis Elie Kassis added a comment -

            sophistifunk the pipeline is already attached, please use it

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

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

            sophistifunk Josh McDonald added a comment - Updated pipeline script triggers the bad behaviour for me also, thanks. I'm looking into the cause.
            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

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

            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.
            sophistifunk Josh McDonald added a comment -

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

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

            Fixed in master @ e49553f1c8792e4e6f74285d3f8377a8f4ec3d99

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

            thank you sophistifunk!

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

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: