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

Blue Ocean shouldn't visualize the parallel keyword of a scripted pipeline directly

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • Jenkins 3.73.2, Blue Ocean Plugin 1.3.1, Pipeline 2.5

      Problem
      Sophisticated users of Pipeline want a more usable way to visualize and interact with their Pipelines. Blue Ocean cannot visualise pipelines in a meaningful way to users where there are a large number of stages or parallels.

      Goals

      1. Reduce unnecessarily visualised parallel branches by reserving parallel syntaxes for visualisation and non-visualisation purposes.
      2. Increase developer satisfaction by making the rules of Pipeline visualisation more consistent and the visualisation usable at any scale.

      See Rationalising Parallel.

      Original Request
      I believe the Pipeline keyword parallel should not be rendered by Ocean View directly respectively in it's on right , but only with transitive dependent Stages. Exception is when there is no stage enclosed by the parallel keyword. Background: since parallel can be used with enclosed stages and not only for the parallel execution of steps, the keyword has moved from being a mere implementation tool to a conceptional one for modeling workflows, this needs to be reflected in the visualization.  In the following comments there are some examples, which try to proove the point respectively my expectations.

      I am aware that there maybe nesting limitations, respectively how deeply the parallel keyword resp. stages are nested.  Here i pratical tread-offs should be made.

        1. ex4.png
          ex4.png
          41 kB
        2. ex3.png
          ex3.png
          25 kB
        3. ex2.png
          ex2.png
          24 kB
        4. ex1.png
          ex1.png
          26 kB

          [JENKINS-47799] Blue Ocean shouldn't visualize the parallel keyword of a scripted pipeline directly

          Christoph Henrici created issue -
          Christoph Henrici made changes -
          Attachment New: Bildschirmfoto 2017-11-02 um 22.03.54.png [ 40207 ]
          Christoph Henrici made changes -
          Attachment New: Senario1.png [ 40208 ]

          Christoph Henrici added a comment - - edited

          Example: 

           

          stage("Stage A" ) {
          node { echo "Task of A"}
          }
          stage("Stage B") {
          parallel ('Parallel B.1':{
          node { echo "Step of Parallel B.1"
          echo "Expect only Stage B or ok, since parallel is not wrapped in a stage Parallel B.1"
          }
          }, 'Parallel B.2':{
          node { echo "Step of Parallel B.2"
          echo "Expect only Stage B or ok, since parallel is not wrapped in a stage Parallel B.2"
          }
          
          })
          }
          stage("Stage C" ) {
          node { echo "Task of C"}
          }
          

          Blue  Ocean show's see attachment ex1.png

          I would be ok with only Stage B, but since not stage word is enclosed ok.

           

           

           

          Christoph Henrici added a comment - - edited Example:    stage( "Stage A" ) { node { echo "Task of A" } } stage( "Stage B" ) { parallel ( 'Parallel B.1' :{ node { echo "Step of Parallel B.1" echo "Expect only Stage B or ok, since parallel is not wrapped in a stage Parallel B.1" } }, 'Parallel B.2' :{ node { echo "Step of Parallel B.2" echo "Expect only Stage B or ok, since parallel is not wrapped in a stage Parallel B.2" } }) } stage( "Stage C" ) { node { echo "Task of C" } } Blue  Ocean show's see attachment ex1.png I would be ok with only Stage B, but since not stage word is enclosed ok.      
          Christoph Henrici made changes -
          Attachment Original: Bildschirmfoto 2017-11-02 um 22.03.54.png [ 40207 ]
          Christoph Henrici made changes -
          Attachment Original: Senario1.png [ 40208 ]
          Christoph Henrici made changes -
          Attachment New: ex1.png [ 40209 ]
          Christoph Henrici made changes -
          Description Original: I believe the Pipeline keyword parallel should not be rendered by Ocean View directly respectively in it's on right , but only with transitive dependent Stages. Exception is when there is no stage enclosed by the parallel keyword. Background: since parallel can be used with enclosed stages and not only for the parallel execution of steps, the keyword has moved from being a mere implementation tool to a conceptional one for modeling workflows, this needs to be reflected in the visualization.  In the following comments there are some examples, which try to proove the point respectively my expectations. New: I believe the Pipeline keyword parallel should not be rendered by Ocean View directly respectively in it's on right , but only with transitive dependent Stages. Exception is when there is no stage enclosed by the parallel keyword. Background: since parallel can be used with enclosed stages and not only for the parallel execution of steps, the keyword has moved from being a mere implementation tool to a conceptional one for modeling workflows, this needs to be reflected in the visualization.  In the following comments there are some examples, which try to proove the point respectively my expectations.

          I am aware that there maybe nesting limitations, respectively how deeply the parallel keyword resp. stages are nested.  Here i can except consistent limitations..

          Example: 

           

          stage("Stage A" ) {
          node { echo "Task of A"}
          } 
          parallel ('Parallel B': {
          stage ("Stage B") { node { echo "Task of Stage B" 
          echo "Would expect Stage B instead of Parallel B"
          } }
          }, 'Parallel C':{
          stage ("Stage C"){node { echo "Task of Stage C"}
          echo "Would expect Stage C instead of Parallel C"
          }
          })
          stage("Stage D" ) {
          node { echo "Task of D"}
          }
          

          Blue Ocean show here see attachment ex2.png

          Here i would clearly expect Stage B and Stage C instead of Parallel B and Parallel C.

           

           

          Christoph Henrici added a comment - Example:    stage( "Stage A" ) { node { echo "Task of A" } } parallel ( 'Parallel B' : { stage ( "Stage B" ) { node { echo "Task of Stage B" echo "Would expect Stage B instead of Parallel B" } } }, 'Parallel C' :{ stage ( "Stage C" ){node { echo "Task of Stage C" } echo "Would expect Stage C instead of Parallel C" } }) stage( "Stage D" ) { node { echo "Task of D" } } Blue Ocean show here see attachment ex2.png Here i would clearly expect Stage B and Stage C instead of Parallel B and Parallel C.    
          Christoph Henrici made changes -
          Attachment New: ex2.png [ 40210 ]

            Unassigned Unassigned
            chenrici Christoph Henrici
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: