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

Error steps may change to show up as errors in pipeline view

    XMLWordPrintable

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean - Candidates

      Description

      Notes
      This issue needs further investigation

      Original request
      In one of our more complex scripted pipelines with special exception/error handling, the error step visualization keeps changing after a while, so that it does not show the error step as failing anymore (and so also no auto-scroll to error works)!?

      I tried to reproduce it to no avail; this is the basic pipeline code (the last and active section in the code being the closest to the original one):

      node {
          // OK:
          /*
          stage('failing-stage') {
              echo 'hello'
              error 'fail on purpose...'
          }
          */
          
          // OK: shows msg in red and expands it
          /*
          stage('failing-stage') {
              echo 'hello'
              try {
                  error 'fail on purpose...'
              } catch (e) {
                  echo "Caught exception: ${e}"
              }
          }
          */
      
          // OK: shows msg in red and expands it
          /*
          stage('failing-stage') {
              echo 'hello'
              try {
                  error 'fail on purpose...'
              } catch (e) {
                  echo "Caught exception: ${e}"
                  throw e
              }
          }
          */
      
          // OK: shows msg in red and expands it
          stage('failing-stage') {
              echo 'hello'
              try {
                  error 'fail on purpose...'
              } catch (e) {
                  ansiColor('xterm') {
                    echo "\033[1;31mCaught exception: ${e}\033[0m bla bla"
                  }
                  throw e
              } finally {
                  echo "finally"
              }
          }
      }
      

      Initially it works fine and looks like this:

      But at one point it stops showing the error step as error! And the AJAX request that fetches the steps (e.g. https://<JENKINS URL>/blue/rest/organizations/jenkins/pipelines/My-Pipeline/runs/414/nodes/60/steps/) shows matching symptoms:

        Attachments

          Activity

          reinholdfuereder Reinhold Füreder created issue -
          jamesdumay James Dumay made changes -
          Field Original Value New Value
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Resolved [ 5 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment image-2017-10-03-16-39-04-396.png [ 39926 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment screenshot-1.png [ 39927 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment linkchecker-77-with-bug.PNG [ 39928 ]
          Attachment linkchecker-79-without-bug.PNG [ 39929 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment linkchecker-77-with-bug.zip [ 39930 ]
          Attachment linkchecker-79-without-bug.zip [ 39931 ]
          reinholdfuereder Reinhold Füreder made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Epic Link JENKINS-43953 [ 181485 ]
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.4 - beta 2 [ 416 ]
          Description In one of our more complex scripted pipelines with special exception/error handling, the error step visualization keeps changing after a while, so that it does not show the error step as failing anymore (and so also no auto-scroll to error works)!?

          I tried to reproduce it to no avail; this is the basic pipeline code (the last and active section in the code being the closest to the original one):
          {code:java}
          node {
              // OK:
              /*
              stage('failing-stage') {
                  echo 'hello'
                  error 'fail on purpose...'
              }
              */
              
              // OK: shows msg in red and expands it
              /*
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      echo "Caught exception: ${e}"
                  }
              }
              */

              // OK: shows msg in red and expands it
              /*
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      echo "Caught exception: ${e}"
                      throw e
                  }
              }
              */

              // OK: shows msg in red and expands it
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      ansiColor('xterm') {
                        echo "\033[1;31mCaught exception: ${e}\033[0m bla bla"
                      }
                      throw e
                  } finally {
                      echo "finally"
                  }
              }
          }
          {code}

          Initially it works fine and looks like this:
          !image-2017-09-07-14-44-27-695.png|thumbnail!

          But at one point it stops showing the error step as error! And the AJAX request that fetches the steps (e.g. https://&lt;JENKINS URL>/blue/rest/organizations/jenkins/pipelines/My-Pipeline/runs/414/nodes/60/steps/) shows matching symptoms:

           !image-2017-09-07-14-50-42-300.png|thumbnail!
          *Notes*
          This issue needs further investigation

          *Original request*
          In one of our more complex scripted pipelines with special exception/error handling, the error step visualization keeps changing after a while, so that it does not show the error step as failing anymore (and so also no auto-scroll to error works)!?

          I tried to reproduce it to no avail; this is the basic pipeline code (the last and active section in the code being the closest to the original one):
          {code:java}
          node {
              // OK:
              /*
              stage('failing-stage') {
                  echo 'hello'
                  error 'fail on purpose...'
              }
              */
              
              // OK: shows msg in red and expands it
              /*
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      echo "Caught exception: ${e}"
                  }
              }
              */

              // OK: shows msg in red and expands it
              /*
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      echo "Caught exception: ${e}"
                      throw e
                  }
              }
              */

              // OK: shows msg in red and expands it
              stage('failing-stage') {
                  echo 'hello'
                  try {
                      error 'fail on purpose...'
                  } catch (e) {
                      ansiColor('xterm') {
                        echo "\033[1;31mCaught exception: ${e}\033[0m bla bla"
                      }
                      throw e
                  } finally {
                      echo "finally"
                  }
              }
          }
          {code}

          Initially it works fine and looks like this:
          !image-2017-09-07-14-44-27-695.png|thumbnail!

          But at one point it stops showing the error step as error! And the AJAX request that fetches the steps (e.g. https://&lt;JENKINS URL>/blue/rest/organizations/jenkins/pipelines/My-Pipeline/runs/414/nodes/60/steps/) shows matching symptoms:

           !image-2017-09-07-14-50-42-300.png|thumbnail!
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.4 - beta 3 [ 416 ] Blue Ocean 1.4 - beta 4 [ 441 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment image-2018-10-30-12-30-10-803.png [ 44913 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment image-2018-10-30-12-32-53-068.png [ 44914 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment TK-Branch-am-selben-Tag.png [ 45000 ]
          Attachment TK-Branch-am-selben-Tag-ClassicUI.png [ 45001 ]
          reinholdfuereder Reinhold Füreder made changes -
          reinholdfuereder Reinhold Füreder made changes -
          reinholdfuereder Reinhold Füreder made changes -
          Attachment TK-Branch-am-selben-Tag-ClassicUI.png [ 45001 ]
          reinholdfuereder Reinhold Füreder made changes -
          Attachment image-2018-11-13-10-19-20-710.png [ 45141 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            reinholdfuereder Reinhold Füreder
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: