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

Include failed step's error to it's log

    XMLWordPrintable

    Details

    • Sprint:
      frank, tethys, christmas
    • Similar Issues:

      Description

      A pipeline step's failure does not get reported in it's log. For example archiver step failure gets reported in overall run's log.

      As discussed with Sam Van Oort, a possible hack around it would be to use failed step's flowNode's ErrorAction, FlowNode.getError().getError().getMessage() and append it to the step's log.

      In blueocean API, step's log is AnnotatedLargeText, and it can be served in streaming fashion, it should be done in such a way to correctly append it to the end of step's log.

        Attachments

          Issue Links

            Activity

            vivek Vivek Pandey created issue -
            jamesdumay James Dumay made changes -
            Field Original Value New Value
            Epic Link JENKINS-35750 [ 171713 ]
            jamesdumay James Dumay made changes -
            Sprint arctic [ 131 ]
            Show
            jamesdumay James Dumay added a comment - Vivek Pandey here's the example Sam Van Oort gave https://github.com/jenkinsci/pipeline-stage-view-plugin/blob/master/rest-api/src/main/java/com/cloudbees/workflow/rest/external/ErrorExt.java#L62
            Hide
            jamesdumay James Dumay added a comment -

            Need to understand scope

            Show
            jamesdumay James Dumay added a comment - Need to understand scope
            Hide
            michaelneale Michael Neale added a comment - - edited

            Vivek Pandey would this include cases like https://issues.jenkins-ci.org/browse/JENKINS-39440 (eg a syntax error which only happens dynamically) or a failure to provision an agent before the pipeline starts (which is captured in the overall log only) as well?

            For example, this script will cause a failure that shows up nothing in node logs (stack trace in main log):

            def foo = null
            
            node {
                stage('blah') {
                    sh "echo 42"
                    foo.bar = 42
                    
                }
            }
            

            And this case shows it failing to start, but not showing up anything in step logs:

            stage('boo') {
                node('nfdslfdsklfjlkdsjlk') {
                    sh "echo 42"
                }
                
            }
            

            In both cases above, the full log shows what is needed but the step logs do not. Will the scope include these?

            Show
            michaelneale Michael Neale added a comment - - edited Vivek Pandey would this include cases like https://issues.jenkins-ci.org/browse/JENKINS-39440 (eg a syntax error which only happens dynamically) or a failure to provision an agent before the pipeline starts (which is captured in the overall log only) as well? For example, this script will cause a failure that shows up nothing in node logs (stack trace in main log): def foo = null node { stage('blah') { sh "echo 42" foo.bar = 42 } } And this case shows it failing to start, but not showing up anything in step logs: stage('boo') { node('nfdslfdsklfjlkdsjlk') { sh "echo 42" } } In both cases above, the full log shows what is needed but the step logs do not. Will the scope include these?
            michaelneale Michael Neale made changes -
            Link This issue relates to JENKINS-39440 [ JENKINS-39440 ]
            michaelneale Michael Neale made changes -
            Link This issue relates to JENKINS-38759 [ JENKINS-38759 ]
            michaelneale Michael Neale made changes -
            Sprint arctic [ 131 ]
            michaelneale Michael Neale made changes -
            Sprint tasman [ 136 ]
            michaelneale Michael Neale made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint tasman [ 136 ] frank [ 156 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Sprint frank [ 156 ] frank 2 [ 161 ]
            michaelneale Michael Neale made changes -
            Link This issue is duplicated by JENKINS-39440 [ JENKINS-39440 ]
            Hide
            michaelneale Michael Neale added a comment -

            Had a discussion with Sam Van Oort and vivek and agreed this is doable

            Show
            michaelneale Michael Neale added a comment - Had a discussion with Sam Van Oort and vivek and agreed this is doable
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Sprint tethys [ 161 ] kraken [ 166 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Labels pipleine-error-reporting
            jamesdumay James Dumay made changes -
            Link This issue blocks JENKINS-39335 [ JENKINS-39335 ]
            jamesdumay James Dumay made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            jamesdumay James Dumay made changes -
            Sprint kraken [ 166 ] frank [ 156 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Link This issue relates to JENKINS-39440 [ JENKINS-39440 ]
            Hide
            jamesdumay James Dumay added a comment -

            Vivek Pandey this is another one to look at over the next week if you find time.

            Show
            jamesdumay James Dumay added a comment - Vivek Pandey this is another one to look at over the next week if you find time.
            jamesdumay James Dumay made changes -
            Sprint frank [ 156 ] frank, christmas [ 156, 176 ]
            vivek Vivek Pandey made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            vivek Vivek Pandey made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jamesdumay James Dumay made changes -
            Sprint frank, christmas [ 156, 176 ] frank, tethys, christmas [ 156, 161, 176 ]
            vivek Vivek Pandey made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal UX-600 (Web Link)" [ 18204 ]
            jbriden Jenn Briden made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                vivek Vivek Pandey
                Reporter:
                vivek Vivek Pandey
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: