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

Regression: Shell step failed but step marked as successful

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • blueocean-plugin
    • None
    • indian

      For this build one of the steps (third from the bottom) within a try...finally failed but the step was never marked as failed

      https://ci.blueocean.io/blue/organizations/jenkins/blueocean/detail/upgrade-rollbar-1.9.2/1/pipeline/

      michaelneale checked the response and the flow node is erroneously marked as failed https://gist.github.com/michaelneale/658f3bec4487b90ce6d478e90edffad0

          [JENKINS-39296] Regression: Shell step failed but step marked as successful

          James Dumay added a comment -

          James Dumay added a comment - vivek this looks related https://ci.blueocean.io/blue/organizations/jenkins/blueocean/detail/story%2FJENKINS-38847/3/pipeline/ https://gist.github.com/i386/3817e2b8347f030288c9c41aa6d61895 ! blueocean #3 2016-10-28 10-38-29.png|thumbnail!

          Vivek Pandey added a comment -

          jamesdumay Log doesn't show there was any error in that finally block. However overall run is marked as failed. Something ate that error away. I am going to isolate it as test case and see if I can reproduce. Maybe its underlying library bug.

          Vivek Pandey added a comment - jamesdumay Log doesn't show there was any error in that finally block. However overall run is marked as failed. Something ate that error away. I am going to isolate it as test case and see if I can reproduce. Maybe its underlying library bug.

          Vivek Pandey added a comment -

          jamesdumay yeah that step is eating away the error. I suspect the finally block is fine as there is no error in the finally block, however I see errors during node compilation. The pipeline code should be printing error before marking the build as failed.

          ...
           } catch(err) {
                  currentBuild.result = "FAILURE"
                } finally {
                  sendhipchat()
                  deleteDir()
                }
          

          Vivek Pandey added a comment - jamesdumay yeah that step is eating away the error. I suspect the finally block is fine as there is no error in the finally block, however I see errors during node compilation. The pipeline code should be printing error before marking the build as failed. ... } catch (err) { currentBuild.result = "FAILURE" } finally { sendhipchat() deleteDir() }

          Vivek Pandey added a comment -

          jamesdumay michaelneale https://ci.blueocean.io/blue/organizations/jenkins/blueocean/detail/story%2FJENKINS-38847/3/pipeline/ definitely is not right. There is bug in step's status calculation, where its using:

                      GenericStatus status = StatusAndTiming.computeChunkStatus(run, before, atomNode, atomNode, after);
          

          This is wrong. this is resulting in computing step's status as chunk vs as individual FlowNode. Fix is in progress.

          Vivek Pandey added a comment - jamesdumay michaelneale https://ci.blueocean.io/blue/organizations/jenkins/blueocean/detail/story%2FJENKINS-38847/3/pipeline/ definitely is not right. There is bug in step's status calculation, where its using: GenericStatus status = StatusAndTiming.computeChunkStatus(run, before, atomNode, atomNode, after); This is wrong. this is resulting in computing step's status as chunk vs as individual FlowNode. Fix is in progress.

          Michael Neale added a comment -

          ah well spotted. I think this has bit a few people (likely some duplicate tickets too)

          Michael Neale added a comment - ah well spotted. I think this has bit a few people (likely some duplicate tickets too)

          James Dumay added a comment - - edited

          vivek where can I find the issue tracking the fix for the step calculation bug? Is it JENKINS-38759 ?

          James Dumay added a comment - - edited vivek where can I find the issue tracking the fix for the step calculation bug? Is it JENKINS-38759 ?

          Vivek Pandey added a comment -

          jamesdumay This was that ticket where I fixed it. Or you mean bug to fix bismuth API to calculate status of individual steps using StatusAndTiming.computeChunkStatus(run, before, atomNode, atomNode, after)? I have not opened one. I guess it might be more like RFE vs fix as this API is intended for chunks and I was hoping it to work for individual step.

          Vivek Pandey added a comment - jamesdumay This was that ticket where I fixed it. Or you mean bug to fix bismuth API to calculate status of individual steps using StatusAndTiming.computeChunkStatus(run, before, atomNode, atomNode, after)? I have not opened one. I guess it might be more like RFE vs fix as this API is intended for chunks and I was hoping it to work for individual step.

          James Dumay added a comment -

          Thanks vivek

          James Dumay added a comment - Thanks vivek

            vivek Vivek Pandey
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: