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

Blue Ocean: Error rendering PipelineRunGraph

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2

      Description

      After recent upgrade to 1.3.0 the existing views are broken with the following error. Not sure if it is going to be the same problem for the new runs, yet to try out. Appreciate some inputs?

      Have reported the similar issue JENKINS-46436 but slightly different with the last version 1.2.0, probably something related to that change. 

      Error rendering PipelineRunGraph: TypeError: Cannot read property 'id' of undefined
      

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment - - edited

            Naresh Rayapati we'd be glad to look into this. Could you please attach a HAR file to this ticket replicating this issue? If you wish to keep the contents of the har file confidential, please email me at jdumay@cloudbees.com with "JENKINS-47480" as the subject and the HAR attached.

            Show
            jamesdumay James Dumay added a comment - - edited Naresh Rayapati we'd be glad to look into this. Could you please attach a HAR file to this ticket replicating this issue? If you wish to keep the contents of the har file confidential, please email me at jdumay@cloudbees.com with " JENKINS-47480 " as the subject and the HAR attached.
            Hide
            cliffmeyers Cliff Meyers added a comment -

            Naresh Rayapati if you have a simplified version of your Jenkinsfile that can reproduce this problem that would be greatly appreciated too.

            Show
            cliffmeyers Cliff Meyers added a comment - Naresh Rayapati if you have a simplified version of your Jenkinsfile that can reproduce this problem that would be greatly appreciated too.
            Hide
            morriste Stephen Morrison added a comment - - edited

            We've also just hit this.  I am so far unsuccessful in reproducing it with a simplified Jenkinsfile.  We have other pipelines running in the same jenkins instance which haven't hit this problem yet, so its a bit wierd.

            Also, this only happens on our master branch at the moment in that particular pipeline.  Other branches using the same Jenkinsfile seem fine.

            Show
            morriste Stephen Morrison added a comment - - edited We've also just hit this.  I am so far unsuccessful in reproducing it with a simplified Jenkinsfile.  We have other pipelines running in the same jenkins instance which haven't hit this problem yet, so its a bit wierd. Also, this only happens on our master branch at the moment in that particular pipeline.  Other branches using the same Jenkinsfile seem fine.
            Hide
            garrettmarone Garrett Marone added a comment -

            Im also having this problem, it's on a job that has many many steps.  When you start running the build, it displays everything, until it gets most of the way through, then it starts throwing this error.

            Show
            garrettmarone Garrett Marone added a comment - Im also having this problem, it's on a job that has many many steps.  When you start running the build, it displays everything, until it gets most of the way through, then it starts throwing this error.
            Hide
            jamesdumay James Dumay added a comment - - edited

            Garrett Marone Stephen Morrison would either of you be able to share your Jenkinsfile? You can email it to me at jdumay@cloudbees.com with the subject "JENKINS-47480" if you wish to keep it confidential. A HAR file of the session would be incredibly useful too.

            Show
            jamesdumay James Dumay added a comment - - edited Garrett Marone Stephen Morrison would either of you be able to share your Jenkinsfile? You can email it to me at jdumay@cloudbees.com with the subject " JENKINS-47480 " if you wish to keep it confidential. A HAR file of the session would be incredibly useful too.
            Hide
            morriste Stephen Morrison added a comment - - edited

            Just for more information, the following comes out in the log:

            Oct 20, 2017 3:42:06 PM io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor parallelStart
            SEVERE: nestedBranches size: 1 not equal to parallelBranchEndNodes: 2
            Oct 20, 2017 3:42:06 PM io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor parallelStart
            SEVERE: nestedBranches size: 3 not equal to parallelBranchEndNodes: 4
            Oct 20, 2017 3:42:06 PM io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor parallelStart
            SEVERE: nestedBranches size: 16 not equal to parallelBranchEndNodes: 17
            

            I've sent you through a har file too, thanks!

            Show
            morriste Stephen Morrison added a comment - - edited Just for more information, the following comes out in the log: Oct 20, 2017 3:42:06 PM io.jenkins.blueocean. rest .impl.pipeline.PipelineNodeGraphVisitor parallelStart SEVERE: nestedBranches size: 1 not equal to parallelBranchEndNodes: 2 Oct 20, 2017 3:42:06 PM io.jenkins.blueocean. rest .impl.pipeline.PipelineNodeGraphVisitor parallelStart SEVERE: nestedBranches size: 3 not equal to parallelBranchEndNodes: 4 Oct 20, 2017 3:42:06 PM io.jenkins.blueocean. rest .impl.pipeline.PipelineNodeGraphVisitor parallelStart SEVERE: nestedBranches size: 16 not equal to parallelBranchEndNodes: 17 I've sent you through a har file too, thanks!
            Hide
            nrayapati Naresh Rayapati added a comment - - edited

            James Dumay / Cliff Meyers Sorry for the late reply, but I noticed that it is happening when we have a parallel step inside another parallel. Here is the sample example to reproduce. hope this is helpful.

            def stepsForParallel = [:]
            for(int i =0; i < 10; i++) {
            stepsForParallel[i] = { 
            def stepsForParallelInternal = [:]
            for(int j =0; j < 10; j++) {
            stepsForParallelInternal[j] = { echo j.toString() }
            }
            parallel stepsForParallelInternal
            }
            }
            parallel stepsForParallel
            stepsForParallel = [:]
            for(int i =0; i < 20; i++) {
            stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            stepsForParallel = [:]
            for(int i =0; i < 20; i++) {
            stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            stepsForParallel = [:]
            for(int i =0; i < 20; i++) {
            stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            stepsForParallel = [:]
            for(int i =0; i < 50; i++) {
            stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            
            Show
            nrayapati Naresh Rayapati added a comment - - edited James Dumay / Cliff Meyers Sorry for the late reply, but I noticed that it is happening when we have a parallel step inside another parallel. Here is the sample example to reproduce. hope this is helpful. def stepsForParallel = [:] for ( int i =0; i < 10; i++) { stepsForParallel[i] = { def stepsForParallelInternal = [:] for ( int j =0; j < 10; j++) { stepsForParallelInternal[j] = { echo j.toString() } } parallel stepsForParallelInternal } } parallel stepsForParallel stepsForParallel = [:] for ( int i =0; i < 20; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i =0; i < 20; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i =0; i < 20; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i =0; i < 50; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel
            Hide
            john_fo John Forrest added a comment -

            We are also seeing this with the latest (public) version of Jenkins, and likewise didn't have it before. It is definitely something to do with parallel. I'm fairly sure we don't have parallel within parallel, but we do like the above generate the parallel statements from maps. I wonder if the issue lies there.

            Show
            john_fo John Forrest added a comment - We are also seeing this with the latest (public) version of Jenkins, and likewise didn't have it before. It is definitely something to do with parallel. I'm fairly sure we don't have parallel within parallel, but we do like the above generate the parallel statements from maps. I wonder if the issue lies there.
            Hide
            benlangfeld Ben Langfeld added a comment -

            I can reproduce this with Naresh Rayapati's script (though only two stages are necessary) based on the 1.3.2 docker image.

            Like John Forrest, our production use case does not use nested parallel statements, but does iteratively build steps to run in parallel. This reproduction, however, doesn't present the issue:

            stepsForParallel = [:]
            for(int i = 0; i < 20; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            
            stepsForParallel = [:]
            for(int i = 0; i < 20; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            

            I'm attempting to reproduce based on the current master branch.

            Show
            benlangfeld Ben Langfeld added a comment - I can reproduce this with Naresh Rayapati 's script (though only two stages are necessary) based on the 1.3.2 docker image. Like John Forrest , our production use case does not use nested parallel statements, but does iteratively build steps to run in parallel. This reproduction, however, doesn't present the issue: stepsForParallel = [:] for ( int i = 0; i < 20; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i = 0; i < 20; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel I'm attempting to reproduce based on the current master branch.
            Hide
            benlangfeld Ben Langfeld added a comment - - edited

            In further testing, again against the 1.3.2 docker image, this works:

            def stepsForParallel = [:]
            for(int i = 0; i < 98; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            
            stepsForParallel = [:]
            for(int i = 0; i < 2; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            

            and this fails:

            def stepsForParallel = [:]
            for(int i = 0; i < 99; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            
            stepsForParallel = [:]
            for(int i = 0; i < 2; i++) {
              stepsForParallel[i] = { echo i.toString() }
            }
            parallel stepsForParallel
            

            The problem here is not nesting, but ending up on the border between two stages when the page ends.

            The fix to request a much larger page size would prevent most people from running into this: https://github.com/jenkinsci/blueocean-plugin/commit/ce4a4b39c4ff2a2d979195da18430205957e7ca8. I've confirmed this resolves the issue in the above reproduction. Could that be released in 1.3.3 immediately Cliff Meyers? This exact issue caused us 4 hours of chaos when we upgraded to 1.3.2 today, it really is a critical fix.

             

            Show
            benlangfeld Ben Langfeld added a comment - - edited In further testing, again against the 1.3.2 docker image, this works: def stepsForParallel = [:] for ( int i = 0; i < 98; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i = 0; i < 2; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel and this fails: def stepsForParallel = [:] for ( int i = 0; i < 99; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel stepsForParallel = [:] for ( int i = 0; i < 2; i++) { stepsForParallel[i] = { echo i.toString() } } parallel stepsForParallel The problem here is not nesting, but ending up on the border between two stages when the page ends. The fix to request a much larger page size would prevent most people from running into this: https://github.com/jenkinsci/blueocean-plugin/commit/ce4a4b39c4ff2a2d979195da18430205957e7ca8.  I've confirmed this resolves the issue in the above reproduction. Could that be released in 1.3.3 immediately Cliff Meyers ? This exact issue caused us 4 hours of chaos when we upgraded to 1.3.2 today, it really is a critical fix.  
            Hide
            cliffmeyers Cliff Meyers added a comment -
            Show
            cliffmeyers Cliff Meyers added a comment - Ping to James Dumay and Vivek Pandey
            Hide
            vivek Vivek Pandey added a comment -

            Thanks Ben Langfeld. I have opened a PR https://github.com/jenkinsci/blueocean-plugin/pull/1556. Once it passes we can plan a 1.3.3 release.

            Show
            vivek Vivek Pandey added a comment - Thanks Ben Langfeld . I have opened a PR https://github.com/jenkinsci/blueocean-plugin/pull/1556 . Once it passes we can plan a 1.3.3 release.
            Hide
            michaelneale Michael Neale added a comment -

            Fixed in master and pending fix for 1.3.3 release

            Show
            michaelneale Michael Neale added a comment - Fixed in master and pending fix for 1.3.3 release
            Hide
            vivek Vivek Pandey added a comment -

            Fixed in release 1.3.3. Release is out but it might take 4-6 hours to get across mirrors.

            Show
            vivek Vivek Pandey added a comment - Fixed in release 1.3.3. Release is out but it might take 4-6 hours to get across mirrors.
            Hide
            benlangfeld Ben Langfeld added a comment -

            I can confirm that this is fixed in 1.3.3 for our production use case.

            Show
            benlangfeld Ben Langfeld added a comment - I can confirm that this is fixed in 1.3.3 for our production use case.
            Hide
            nrayapati Naresh Rayapati added a comment -

            Thanks Vivek Pandey and Ben Langfeld Our pipeline are fixed too.

            Show
            nrayapati Naresh Rayapati added a comment - Thanks Vivek Pandey and Ben Langfeld Our pipeline are fixed too.
            Hide
            kshultz Karl Shultz added a comment - - edited

            Testing Notes:

            • For this particular issue, manual verification, using the pipelines kindly provided by Ben Langfeld, should suffice.
            • Longer term:
              • Test cases with longer, more parallel, more complex Jenkinsfiles should be implemented to make sure that Blue Ocean properly renders them
              • A repo of pipelines which can be used to trigger past issues could be collected over time, and used to inform these test cases
            Show
            kshultz Karl Shultz added a comment - - edited Testing Notes: For this particular issue, manual verification, using the pipelines kindly provided by Ben Langfeld , should suffice. Longer term: Test cases with longer, more parallel, more complex Jenkinsfiles should be implemented to make sure that Blue Ocean properly renders them A repo of pipelines which can be used to trigger past issues could be collected over time, and used to inform these test cases
            Hide
            kshultz Karl Shultz added a comment -

            Adding a link to the child ticket, which talks about exploring some more automated complex test cases.

            Show
            kshultz Karl Shultz added a comment - Adding a link to the child ticket, which talks about exploring some more automated complex test cases.

              People

              • Assignee:
                vivek Vivek Pandey
                Reporter:
                nrayapati Naresh Rayapati
              • Votes:
                2 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: