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

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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • blueocean-plugin
    • Jenkins: 2.138.1
      Blue Ocean: 1.8.3
      OS: RHEL7.2
      Browser: Google Chrome

      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.

       

       

          [JENKINS-53900] Stage graph in Blue Ocean not showing all stages for large workflows

          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: 

          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: 

          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?

          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?

          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

          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

          Elie Kassis added a comment -

          sophistifunk the pipeline is already attached, please use it

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

          Josh McDonald added a comment -

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

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

          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

          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

          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.

          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.

          Josh McDonald added a comment -

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

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

          Josh McDonald added a comment -

          Fixed in master @ e49553f1c8792e4e6f74285d3f8377a8f4ec3d99

          Josh McDonald added a comment - Fixed in master @ e49553f1c8792e4e6f74285d3f8377a8f4ec3d99

          Elie Kassis added a comment -

          thank you sophistifunk!

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

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

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

              Created:
              Updated:
              Resolved: