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

    • pipeline-model-definition 1.3.7

      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.

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

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

          Ray Kivisto created issue -
          Ray Kivisto made changes -
          Environment New: Fresh Jenkins LTS 2.150.3 install
          'recommended' plugins, including [Pipeline: Declarative Plugin|https://plugins.jenkins.io/pipeline-model-definition] version 1.3.6
          Devin Nusbaum made changes -
          Assignee Original: Andrew Bayer [ abayer ] New: Devin Nusbaum [ dnusbaum ]
          Devin Nusbaum made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Ray Kivisto made changes -
          Attachment New: pipeline__Jenkins__and_Mozilla_Firefox.png [ 46518 ]
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/pipeline-model-definition-plugin#322 (Web Link)" [ 22511 ]
          Devin Nusbaum made changes -
          Summary Original: failFast option for parallel stages sets build status to ABORTED when failure is inside of a nested parallel stage New: failFast option for parallel stages sets build status to ABORTED when failure is inside of a stage with an agent
          Devin Nusbaum made changes -
          Description Original: h3. Symptom

          With a Pipeline using parallel stages with {{failFast true}} enabled, when a nested stage 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.
          h3. Evidence

          The fix for JENKINS-55459 was delivered under version 1.3.5 of the [Pipeline: Declarative Plugin|https://plugins.jenkins.io/pipeline-model-definition], 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|https://plugins.jenkins.io/pipeline-model-definition] 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}}:

          !test.png!
          {code}
          ...
          ERROR: script returned exit code 1
          Finished: ABORTED
          {code}
          Here is the full log: [^log]

          I expected the build status to be marked as {{FAILURE}}, not {{ABORTED}}.
          h3. Hypothesis

          I believe the fix from JENKINS-55459 worked, but does not account for failures inside of nested stages within the parallel stages.
          New: h3. 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.
          h3. Evidence

          The fix for JENKINS-55459 was delivered under version 1.3.5 of the [Pipeline: Declarative Plugin|https://plugins.jenkins.io/pipeline-model-definition], 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|https://plugins.jenkins.io/pipeline-model-definition] 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}}:

          !test.png!
          {code}
          ...
          ERROR: script returned exit code 1
          Finished: ABORTED
          {code}
          Here is the full log: [^log]

          I expected the build status to be marked as {{FAILURE}}, not {{ABORTED}}.
          h3. Hypothesis

          I believe the fix from JENKINS-55459 worked, but does not account for failures inside of stages with agents within the parallel stages.
          Devin Nusbaum made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Devin Nusbaum made changes -
          Link New: This issue relates to JENKINS-55459 [ JENKINS-55459 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]

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

              Created:
              Updated:
              Resolved: