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

Build result regression since pipeline-maven 3.5.15 for failing tests (UNSTABLE)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • pipeline-maven-plugin
    • None
    • Jenkins ver. 2.138.2
      pipeline-maven 3.5.15

      The removal of this block is causing a (temporary) inconsistent overall build result because archiver.perform() used to set currentBuild.result in 3.5.14 (see also here) but now (due to the removal) the result is not set anymore.

      This now leads to other plugins picking up the wrong result (SUCCESS) when being used in post pipeline blocks. We, for instance, explicitely call step([$class: 'StashNotifier']) in cleanup which before 3.5.15 sent the correct status to BitBucket PRs but now with 3.5.15 the PRs always receive SUCCESS/OK even though there are test failures.
      And of course if you evaluate currentBuild.result directly (like we also do to send messages via Rocket.Chat), you also see the wrong result.

      The final pipeline build result is correct in these cases (UNSTABLE) but you just cannot retrieve it anymore from within the pipeline while it is still running.

      I consider this a severe breaking change.

      What puzzles me is that the very same commit that removed the invokation of archiver.perform() also removed this note (further down):

      // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.

      Judging from it's status, JENKINS-43995 has not "landed" yet!
       

          [JENKINS-54559] Build result regression since pipeline-maven 3.5.15 for failing tests (UNSTABLE)

          Strange, even if I removed the comment "TODO: Once JENKINS-43995..." the logic is still the same. I'm adding troubleshooting logs.
          see https://github.com/jenkinsci/pipeline-maven-plugin/tree/JENKINS-54559

          Cyrille Le Clerc added a comment - Strange, even if I removed the comment "TODO: Once JENKINS-43995 ..." the logic is still the same. I'm adding troubleshooting logs. see https://github.com/jenkinsci/pipeline-maven-plugin/tree/JENKINS-54559

          Falko Modler added a comment - - edited

          I think there is a misunderstanding. The block that you just enriched with log output has indeed not changed semantically.
          I was just wondering whether you removed the call to archiver because you assumed JENKINS-43995 is done (which isn't the case).
          That's the only reason why I mentioned this lower block (:308 and below).

          The actual regression was introduced by the change of the upper block/line (:295). I tried to highlight the problem in this screenshot:

          Falko Modler added a comment - - edited I think there is a misunderstanding. The block that you just enriched with log output has indeed not changed semantically. I was just wondering whether you removed the call to archiver because you assumed JENKINS-43995 is done (which isn't the case). That's the only reason why I mentioned this lower block (:308 and below). The actual regression was introduced by the change of the upper block/line (:295). I tried to highlight the problem in this screenshot:

          Understood, PR in progress. Thanks @famod !

          Cyrille Le Clerc added a comment - Understood, PR in progress. Thanks @famod !

          Cyrille Le Clerc added a comment - - edited

          Cyrille Le Clerc added a comment - - edited Available in 3.6.0-beta-1: https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.0-beta-1

          Delivered in 3.6.0

          Cyrille Le Clerc added a comment - Delivered in 3.6.0

          Falko Modler added a comment -

          Fix confirmed - thanks for your quick reaction, cleclerc!

          Falko Modler added a comment - Fix confirmed - thanks for your quick reaction, cleclerc !

            cleclerc Cyrille Le Clerc
            famod Falko Modler
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: