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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None
    • Blue Ocean - Candidates

      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:

          [JENKINS-46715] Error steps may change to show up as errors in pipeline view

          Reinhold Füreder created issue -
          James Dumay made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Reinhold Füreder made changes -
          Attachment New: image-2017-10-03-16-39-04-396.png [ 39926 ]
          Reinhold Füreder made changes -
          Attachment New: screenshot-1.png [ 39927 ]
          Reinhold Füreder made changes -
          Attachment New: linkchecker-77-with-bug.PNG [ 39928 ]
          Attachment New: linkchecker-79-without-bug.PNG [ 39929 ]
          Reinhold Füreder made changes -
          Attachment New: linkchecker-77-with-bug.zip [ 39930 ]
          Attachment New: linkchecker-79-without-bug.zip [ 39931 ]
          Reinhold Füreder made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Epic Link New: JENKINS-43953 [ 181485 ]
          James Dumay made changes -
          Sprint New: Blue Ocean 1.4 - beta 2 [ 416 ]
          Description Original: 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!
          New: *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!
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.4 - beta 3 [ 416 ] New: Blue Ocean 1.4 - beta 4 [ 441 ]

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

              Created:
              Updated: