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

Misc infrastructure errors are missing from step view. Blue ocean should default to showing a log tail at end of failed build.

    • Blue Ocean 1.4 - beta 3, Blue Ocean - Candidates, Blue Ocean 1.6 - beta 2

      In many cases there is a failure in a pipeline run which does not show up in a helpful way in the pipeline results screen. 

      this can manifest as some failed stages that are missing the key information. 

      eg : https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fpipeline-build-step-plugin/detail/PR-18/3/pipeline/9

      Shows just failed stages and steps (see attached), but is missing the key error: 

      Also:   hudson.AbortException: Queue task was cancelled
      		at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$CancelledItemListener.onLeft(ExecutorStepExecution.java:213)
      		at hudson.model.Queue$LeftItem.enter(Queue.java:2723)
      		at hudson.model.Queue$Item.cancel(Queue.java:2311)
      		at hudson.model.Queue.cancel(Queue.java:745)
      		at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution.stop(ExecutorStepExecution.java:130)
      		at org.jenkinsci.plugins.workflow.cps.CpsThread.stop(CpsThread.java:296)
      		at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$2.onSuccess(CpsBodyExecution.java:260)
      		at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$2.onSuccess(CpsBodyExecution.java:247)
      		at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:746)
      		at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      		at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      		at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)

      which is in the full log. 

       

      Another case is attached where the pipeline shows just one failed stage, but no failed steps at all. 

      In this case there was a stack trace in the log file (also attached) which showed the real error. 

       

      What should happen:

      Given the myriad ways in which a pipeline run can fail, often due to infra or configuration, it seems too much "whack a mole" to try and shoehorn all errors into steps/stages. 

      perhaps a better approach is to identity failure cases and err on the side of showing the fill log "tail" on screen, perhaps as the final step visible. This would make all "misc" failures clear. 

      The pipeline graph is useful in these cases, just not the logs shown in steps. 

       

      raised by teilo

       

      This may make the following irrelevant: 

      https://issues.jenkins-ci.org/browse/JENKINS-46715

      https://issues.jenkins-ci.org/browse/JENKINS-45380

       

       

       

          [JENKINS-48524] Misc infrastructure errors are missing from step view. Blue ocean should default to showing a log tail at end of failed build.

          Michael Neale created issue -

          Michael Neale added a comment -

          vivek request for comment: do you think this is possible/doable? (ie to fall back to grabbing a tail of the log in some failure cases to make the result screen better for these infra failures?)

          Michael Neale added a comment - vivek request for comment: do you think this is possible/doable? (ie to fall back to grabbing a tail of the log in some failure cases to make the result screen better for these infra failures?)
          Michael Neale made changes -
          Assignee New: Vivek Pandey [ vivek ]
          Michael Neale made changes -
          Assignee Original: Vivek Pandey [ vivek ]
          Michael Neale made changes -
          Sprint Original: Blue Ocean 1.4 - beta 4 [ 441 ] New: Blue Ocean 1.4 - beta 3 [ 416 ]

          James Nord added a comment - - edited

          I mentioned to michaelneale privatley my concern about just tailing the log so will add it here.

          There is no way to know how log the stack trace is in the log. it may be severel exceptions deep (nested) or have suppressions.

          In these cases the upper pipeline has caugth the error and logged it - to me it should also record this exception somewhere and allow retreival for it so that BO can check if there was an overall exception and if so display it without having to just tail some logs in the off chance.

          //cc abayer / jglick - not sure if it is possible to change pipeline to store this (or if it is already stored somewhere and we just don;t know about it)

          James Nord added a comment - - edited I mentioned to michaelneale privatley my concern about just tailing the log so will add it here. There is no way to know how log the stack trace is in the log. it may be severel exceptions deep (nested) or have suppressions. In these cases the upper pipeline has caugth the error and logged it - to me it should also record this exception somewhere and allow retreival for it so that BO can check if there was an overall exception and if so display it without having to just tail some logs in the off chance. //cc abayer / jglick - not sure if it is possible to change pipeline to store this (or if it is already stored somewhere and we just don;t know about it)
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.4 - beta 3 [ 416 ] New: Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 5 [ 416, 451 ]

          Karl Shultz added a comment -

          Testing Notes:
          Once implemented, unit tests should be included as part of the PR.

          Karl Shultz added a comment - Testing Notes: Once implemented, unit tests should be included as part of the PR.
          Karl Shultz made changes -
          Labels New: testing-notes-reviewed
          Vivek Pandey made changes -
          Sprint Original: Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 5 [ 416, 451 ] New: Blue Ocean 1.4 - beta 3, Blue Ocean 1.5 - beta 1 [ 416, 456 ]
          Vivek Pandey made changes -
          Rank New: Ranked higher

            Unassigned Unassigned
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: