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

failFast option for parallel stages sets build status to ABORTED when failure is inside of a stage with an agent

    Details

    • Similar Issues:
    • Released As:
      pipeline-model-definition 1.3.7

      Description

      Symptom

      With a Pipeline using parallel stages with failFast true enabled, when a stage with an agent fails, the final build result is showing as ABORTED instead of FAILURE

      A similar bug was recently fixed JENKINS-55459 which corrected the build status result when using non-nested parallel stages with failFast true enabled, but it seems it did not catch the case where a nested stage inside of one of the parallel stages fails.

      Evidence

      The fix for JENKINS-55459 was delivered under version 1.3.5 of the Pipeline: Declarative Plugin, I am testing version 1.3.6.

      I started up a brand new Jenkins LTS 2.150.3 instance, with the 'recommended' plugins, including Pipeline: Declarative Plugin version 1.3.6

      I ran the testcase inside of JENKINS-55459 and the build status is correctly marked as failed, so the fix from JENKINS-55459 was correct.

      When I run the attached Jenkinsfile , the build still shows as ABORTED:

      ...
      ERROR: script returned exit code 1
      Finished: ABORTED
      

      Here is the full log: log

      I expected the build status to be marked as FAILURE, not ABORTED.

      Hypothesis

      I believe the fix from JENKINS-55459 worked, but does not account for failures inside of stages with agents within the parallel stages.

        Attachments

        1. Jenkinsfile
          2 kB
        2. log
          2 kB
        3. pipeline__Jenkins__and_Mozilla_Firefox.png
          pipeline__Jenkins__and_Mozilla_Firefox.png
          100 kB
        4. test.png
          test.png
          48 kB

          Issue Links

            Activity

            Hide
            dnusbaum Devin Nusbaum added a comment -

            I'm not sure why you were not able to reproduce with my original testcase

            I probably didn't clean my plugin work directory or something and so was running code that didn't match 1.3.6, and then immediately started trying to simplify and got rid of the key piece that causes the issue. I think your reproduction should work fine, thanks for coming up with it!

            Show
            dnusbaum Devin Nusbaum added a comment - I'm not sure why you were not able to reproduce with my original testcase I probably didn't clean my plugin work directory or something and so was running code that didn't match 1.3.6, and then immediately started trying to simplify and got rid of the key piece that causes the issue. I think your reproduction should work fine, thanks for coming up with it!
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Filed https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/322 which I think should fix the problem and updated the ticket title/description with what seems like crux of the issue - the fix in JENKINS-55459 didn't work for any stage with an agent.

            Show
            dnusbaum Devin Nusbaum added a comment - Filed https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/322 which I think should fix the problem and updated the ticket title/description with what seems like crux of the issue - the fix in JENKINS-55459 didn't work for any stage with an agent.
            Hide
            abayer Andrew Bayer added a comment -

            Merged, releasing as 1.3.7 right now.

            Show
            abayer Andrew Bayer added a comment - Merged, releasing as 1.3.7 right now.
            Hide
            rkivisto Ray Kivisto added a comment -

            Verified fixed in Pipeline: Declarative version 1.3.7, thanks!

            Show
            rkivisto Ray Kivisto added a comment - Verified fixed in Pipeline: Declarative version 1.3.7, thanks!
            Hide
            bitwiseman Liam Newman added a comment -

            Bulk closing resolved issues.

            Show
            bitwiseman Liam Newman added a comment - Bulk closing resolved issues.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                rkivisto Ray Kivisto
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: