• Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2

      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
      

          [JENKINS-47480] Blue Ocean: Error rendering PipelineRunGraph

          James Dumay added a comment - - edited

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

          James Dumay added a comment - - edited nrayapati 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.

          Cliff Meyers added a comment -

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

          Cliff Meyers added a comment - nrayapati if you have a simplified version of your Jenkinsfile that can reproduce this problem that would be greatly appreciated too.

          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.

          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.

          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.

          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.

          James Dumay added a comment - - edited

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

          James Dumay added a comment - - edited garrettmarone morriste 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.

          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!

          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!

          Naresh Rayapati added a comment - - edited

          jamesdumay / cliffmeyers 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
          

          Naresh Rayapati added a comment - - edited jamesdumay / cliffmeyers 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

          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.

          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.

          Ben Langfeld added a comment -

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

          Like john_fo, 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.

          Ben Langfeld added a comment - I can reproduce this with nrayapati 's script (though only two stages are necessary) based on the 1.3.2 docker image. Like john_fo , 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.

          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 cliffmeyers? This exact issue caused us 4 hours of chaos when we upgraded to 1.3.2 today, it really is a critical fix.

           

          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 cliffmeyers ? This exact issue caused us 4 hours of chaos when we upgraded to 1.3.2 today, it really is a critical fix.  

          Cliff Meyers added a comment -

          Ping to jamesdumay and vivek

          Cliff Meyers added a comment - Ping to jamesdumay and vivek

          Vivek Pandey added a comment -

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

          Vivek Pandey added a comment - Thanks benlangfeld . I have opened a PR https://github.com/jenkinsci/blueocean-plugin/pull/1556 . Once it passes we can plan a 1.3.3 release.

          Michael Neale added a comment -

          Fixed in master and pending fix for 1.3.3 release

          Michael Neale added a comment - Fixed in master and pending fix for 1.3.3 release

          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.

          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.

          Ben Langfeld added a comment -

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

          Ben Langfeld added a comment - I can confirm that this is fixed in 1.3.3 for our production use case.

          Thanks vivek and benlangfeld Our pipeline are fixed too.

          Naresh Rayapati added a comment - Thanks vivek and benlangfeld Our pipeline are fixed too.

          Karl Shultz added a comment - - edited

          Testing Notes:

          • For this particular issue, manual verification, using the pipelines kindly provided by benlangfeld, 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

          Karl Shultz added a comment - - edited Testing Notes: For this particular issue, manual verification, using the pipelines kindly provided by benlangfeld , 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

          Karl Shultz added a comment -

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

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

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

              Created:
              Updated:
              Resolved: