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

The failed parallel build step should be focused and aborted when failFast

    Details

    • Similar Issues:

      Description

      Scope

      • The aborted parallel branches should be marked as aborted.
      • The failing branch should be marked as failed
      • Ensure that only the failing branch is selected in the UI

      Notes
      Stepping through the code it looks like the aborted branches are marked as Result.ABORTED but this information is not bubbled up from bismuth. Aborted steps in this scenario are always reported as failed.

      Original request
      Using a pipeline job like: 

      pipeline {
          agent any
          stages {
              stage ('parallel with failFast') {
                  steps {
                      parallel(
                        b: { 
                            echo 'died'
                            sh "exit 1"
                        },
                        // make sure this branch takes longer than b
                        a: { sh "sleep 35"},
                        failFast: true
                      )    
                  }
              }        
          }
      }
      

      I would expect the failed step to be focused when entering the build page, instead the aborted branch and log is focused.
      Also the aborted branch(es) should be visually different than the actual failed branch.

      Technically more than one branch could fail before being aborted any any such branch should also be indicated as failed (like today).

      I attached an examples of current and expected behavior of how I wish the build page would look for such a failed build. The aborted job indicator could of course be different, I just want it to stand out from an actual failed job. 

      Fixing this would significantly improve using massively parallel builds.

      Data returned from Blue Ocean REST API

      [
         {
            "_class":"io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
            "_links":{
               "self":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/6/"
               },
               "actions":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/6/actions/"
               },
               "steps":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/6/steps/"
               }
            },
            "actions":[
      
            ],
            "displayName":"parallel with failFast",
            "durationInMillis":1025,
            "id":"6",
            "input":null,
            "result":"FAILURE",
            "startTime":"2017-04-04T14:44:32.809+1000",
            "state":"FINISHED",
            "causeOfBlockage":null,
            "edges":[
               {
                  "_class":"io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl$EdgeImpl",
                  "id":"10"
               },
               {
                  "_class":"io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl$EdgeImpl",
                  "id":"9"
               }
            ]
         },
         {
            "_class":"io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
            "_links":{
               "self":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/10/"
               },
               "actions":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/10/actions/"
               },
               "steps":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/10/steps/"
               }
            },
            "actions":[
      
            ],
            "displayName":"a",
            "durationInMillis":1022,
            "id":"10",
            "input":null,
            "result":"FAILURE",
            "startTime":"2017-04-04T14:44:32.812+1000",
            "state":"FINISHED",
            "causeOfBlockage":null,
            "edges":[
      
            ]
         },
         {
            "_class":"io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
            "_links":{
               "self":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/9/"
               },
               "actions":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/9/actions/"
               },
               "steps":{
                  "_class":"io.jenkins.blueocean.rest.hal.Link",
                  "href":"/blue/rest/organizations/jenkins/pipelines/JENKINS-43292/runs/1/nodes/9/steps/"
               }
            },
            "actions":[
      
            ],
            "displayName":"b",
            "durationInMillis":1024,
            "id":"9",
            "input":null,
            "result":"FAILURE",
            "startTime":"2017-04-04T14:44:32.810+1000",
            "state":"FINISHED",
            "causeOfBlockage":null,
            "edges":[
      
            ]
         }
      ]
      

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Staffan Forsell thanks for filing this and I am going to accept it onto our backlog for future improvements. There is a significant change that needs to be made to the parts of Pipeline API to get the correct information (aborted parallel branches) display in Blue Ocean. I will raise this with our friends over in the Pipeline team and see what they can do.

            Show
            jamesdumay James Dumay added a comment - Staffan Forsell thanks for filing this and I am going to accept it onto our backlog for future improvements. There is a significant change that needs to be made to the parts of Pipeline API to get the correct information (aborted parallel branches) display in Blue Ocean. I will raise this with our friends over in the Pipeline team and see what they can do.
            Hide
            fkykko Staffan Forsell added a comment -

            James Dumay Thank you. This would really improve usability with parallel branches along with some way of visualizing deeper stage nesting/parallelism.

            Show
            fkykko Staffan Forsell added a comment - James Dumay  Thank you. This would really improve usability with parallel branches along with some way of visualizing deeper stage nesting/parallelism.
            Hide
            jamesdumay James Dumay added a comment -

            Staffan Forsell I have been told the backend changes required are a priority so hopefully we will see some movement over the 1-3 months here. A bit slow going at the moment but we are working on our technical debt so we can speed up the development of new feature enhancements

            Show
            jamesdumay James Dumay added a comment - Staffan Forsell I have been told the backend changes required are a priority so hopefully we will see some movement over the 1-3 months here. A bit slow going at the moment but we are working on our technical debt so we can speed up the development of new feature enhancements
            Hide
            jamesdumay James Dumay added a comment -

            I suspect this ticket is a close cousin to JENKINS-39203.

            Show
            jamesdumay James Dumay added a comment - I suspect this ticket is a close cousin to JENKINS-39203 .
            Hide
            batmat Baptiste Mathus added a comment - - edited

            I strongly second this issue. We are currently suffering from this as we run typically 130 or more parallel branches. When one branch fails, every circles go from green to red. Then, to know which one fail, you either have to click on each circle, and scroll down a lot each time, or go back to the full logs, or possibly the classic UI looking at steps. Thanks!

            Show
            batmat Baptiste Mathus added a comment - - edited I strongly second this issue. We are currently suffering from this as we run typically 130 or more parallel branches. When one branch fails, every circles go from green to red. Then, to know which one fail, you either have to click on each circle, and scroll down a lot each time, or go back to the full logs, or possibly the classic UI looking at steps. Thanks!
            Hide
            jamesdumay James Dumay added a comment - - edited

            Just so you know work has been started in Pipeline to expose more granular step statuses to Blue Ocean. This ticket is important to us and is on the roadmap (via JENKINS-39203)

            Show
            jamesdumay James Dumay added a comment - - edited Just so you know work has been started in Pipeline to expose more granular step statuses to Blue Ocean. This ticket is important to us and is on the roadmap (via JENKINS-39203 )
            Hide
            batmat Baptiste Mathus added a comment -

            Cool!

            Show
            batmat Baptiste Mathus added a comment - Cool!
            Hide
            svanoort Sam Van Oort added a comment -

            This isn't really a Blue Ocean change, since I'll have to make any appropriate modifications within the Bismuth pipeline graph analysis APIs and perhaps deeper changes as per JENKINS-26522 – Blue Ocean will simply see that magically. 

            While Blue Ocean will see the benefits, this is not work on the Blue Ocean end of things. 

            Correcting the tags appropriately for James Dumay and Baptiste Mathus

            Show
            svanoort Sam Van Oort added a comment - This isn't really a Blue Ocean change, since I'll have to make any appropriate modifications within the Bismuth pipeline graph analysis APIs and perhaps deeper changes as per JENKINS-26522 – Blue Ocean will simply see that magically.  While Blue Ocean will see the benefits, this is not work on the Blue Ocean end of things.  Correcting the tags appropriately for  James Dumay  and  Baptiste Mathus
            Hide
            jamesdumay James Dumay added a comment -

            Sam Van Oort oh there is still UI work we need to do here to ensure the right step is selected.

            Show
            jamesdumay James Dumay added a comment - Sam Van Oort oh there is still UI work we need to do here to ensure the right step is selected.
            Hide
            svanoort Sam Van Oort added a comment -

            Per discussion with James: 

            • This tracks overall effort, to be closed when we've verified the changes mentioned above add Abort support for parallels (normal, we don't close tickets until features are verified)
            • Leaving both components on there, since the focusing change may need some (hopefully small) front-end work
            • This will likely track primarily to the backend work (depending on how much work the focusing is) - still some open questions about if side JIRA issues will be used as well.
            Show
            svanoort Sam Van Oort added a comment - Per discussion with James:  This tracks overall effort, to be closed when we've verified the changes mentioned above add Abort support for parallels (normal, we don't close tickets until features are verified) Leaving both components on there, since the focusing change may need some (hopefully small) front-end work This will likely track primarily to the backend work (depending on how much work the focusing is) - still some open questions about if side JIRA issues will be used as well.
            Hide
            xitrium Sean Talts added a comment -

            Does anyone have workarounds for this? Ways to convey to the end user which stage failed and why from within a parallel section?

            Show
            xitrium Sean Talts added a comment - Does anyone have workarounds for this? Ways to convey to the end user which stage failed and why from within a parallel section?
            Hide
            cliffmeyers Cliff Meyers added a comment -

            Just adding my vote for this issue. We have a pipeline stage with 7 parallels, and every time a build fails we need to click around between the child stages to figure out which one actually failed. This makes the system less usable than Classic, where I can just scroll to the bottom of the combined log and see what actually failed.

            Show
            cliffmeyers Cliff Meyers added a comment - Just adding my vote for this issue. We have a pipeline stage with 7 parallels, and every time a build fails we need to click around between the child stages to figure out which one actually failed. This makes the system less usable than Classic, where I can just scroll to the bottom of the combined log and see what actually failed.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                fkykko Staffan Forsell
              • Votes:
                20 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: