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

Regression: Shell step failed but step marked as successful

    Details

    • Sprint:
      indian
    • Similar Issues:

      Description

      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/

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

        Attachments

          Activity

          Show
          jamesdumay James Dumay added a comment - Vivek Pandey 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!
          Hide
          vivek Vivek Pandey added a comment -

          James Dumay 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.

          Show
          vivek Vivek Pandey added a comment - James Dumay 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.
          Hide
          vivek Vivek Pandey added a comment -

          James Dumay 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()
                }
          
          Show
          vivek Vivek Pandey added a comment - James Dumay 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() }
          Hide
          vivek Vivek Pandey added a comment -

          James Dumay Michael Neale 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.

          Show
          vivek Vivek Pandey added a comment - James Dumay Michael Neale 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.
          Hide
          michaelneale Michael Neale added a comment -

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

          Show
          michaelneale Michael Neale added a comment - ah well spotted. I think this has bit a few people (likely some duplicate tickets too)
          Hide
          jamesdumay James Dumay added a comment - - edited

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

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

          James Dumay 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.

          Show
          vivek Vivek Pandey added a comment - James Dumay 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.
          Hide
          jamesdumay James Dumay added a comment -

          Thanks Vivek Pandey

          Show
          jamesdumay James Dumay added a comment - Thanks Vivek Pandey

            People

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

              Dates

              • Created:
                Updated:
                Resolved: