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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

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

        Issue Links

          Activity

            chenrici Christoph Henrici added a comment - - edited

            I see justification for both argumentations of svanoort and jamesdumay. The difference is a matter of emphasis, priorisations and feasibility. The main point being though what you want to vizualize. And here i my opinion is unchanged. Parallel is a adjective:  it's  parallel somethings ,  parallel stages , parallel steps , parallel tasks,  parallel processes, whatever... so you want to vizualize stages, steps as node and additionally the fact that they are parallel in ralation to other stages , tasks. You do NOT what to vizualize parallel as a node itself, which is want currently is happening in Ocean View. 

            chenrici Christoph Henrici added a comment - - edited I see justification for both argumentations of svanoort and jamesdumay . The difference is a matter of emphasis, priorisations and feasibility. The main point being though what you want to vizualize. And here i my opinion is unchanged. Parallel is a adjective:  it's  parallel somethings ,  parallel stages , parallel steps , parallel tasks,  parallel processes, whatever... so you want to vizualize stages, steps as node and additionally the fact that they are parallel in ralation to other stages , tasks. You do NOT what to vizualize parallel as a node itself, which is want currently is happening in Ocean View. 
            svanoort Sam Van Oort added a comment -

            This doesn't make sense to me – the parallel construct is heavily used and works in its intended role.  What isn't fully supported is nesting, but parallel branches are labelled for a reason. 

            The better solution is to fully support nesting, or ensure that for Scripted pipelines Blue Ocean does the same hack on Parallels with nested Stages that it does with Declarative. 

            Better yet, let the UI support nesting fully, but with the UX showing "Parallel A { Stage A {" as one branch if there are no other stages/parallels nested inside the parallel (to reduce visual clutter).   The lower-level APIs are all written to permit nesting of any stage/parallel combo – it just isn't propagated up to the UI because that lacks support.

            svanoort Sam Van Oort added a comment - This doesn't make sense to me – the parallel construct is heavily used and works in its intended role.  What isn't fully supported is nesting, but parallel branches are labelled for a reason.  The better solution is to fully support nesting, or ensure that for Scripted pipelines Blue Ocean does the same hack on Parallels with nested Stages that it does with Declarative.  Better yet, let the UI support nesting fully, but with the UX showing "Parallel A { Stage A {" as one branch if there are no other stages/parallels nested inside the parallel (to reduce visual clutter).   The lower-level APIs are all written to permit nesting of any stage/parallel combo – it just isn't propagated up to the UI because that lacks support.
            jglick Jesse Glick added a comment -

            Parallel Stage syntax from Declarative is made available for scripted Pipelines.

            does not make sense. Scripted is a superset of Declarative so of course you can already decide in a scripted Pipeline whether to introduce a stage in each branch or not. No changes to the parallel step are required or advisable.

            jglick Jesse Glick added a comment - Parallel Stage syntax from Declarative is made available for scripted Pipelines. does not make sense. Scripted is a superset of Declarative so of course you can already decide in a scripted Pipeline whether to introduce a stage in each branch or not. No changes to the parallel step are required or advisable.
            jamesdumay James Dumay added a comment -

            chenrici great to hear that you concur!

            jamesdumay James Dumay added a comment - chenrici great to hear that you concur!

            jamesdumay that's a very valid proposal. If i understand correctly the key word parallel would be in the long run ignored in Blue Ocean visualization except for before stages also for scripted pipelines. 

            "Parallel execution is used to speed up the execution of the pipeline by having different parts run in parallel. They have little or no bearing on the stage flow graph and in generally not useful to visualise." Absolutely agreed. 

            And with this approach , if a developer finds parallel processing important to visualize he can use the proposed syntax

             

            chenrici Christoph Henrici added a comment - jamesdumay that's  a very valid proposal. If i understand correctly the key word parallel would be in the long run ignored in Blue Ocean visualization except for before stages also for scripted pipelines.  "Parallel execution is used to speed up the execution of the pipeline by having different parts run in parallel. They have little or no bearing on the stage flow graph and in generally not useful to visualise." Absolutely agreed.  And with this approach , if a developer finds parallel processing important to visualize he can use the proposed syntax  

            People

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

              Dates

                Created:
                Updated: