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

workflow job do not print a backtrace when failing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • pipeline
    • None
    • jenkins: 1.580.2
      workflow plugins: 1.4

      I have a simple worflow job which runs this script:

      def r = new aldebaran.agbuild.MyRunner()
      r.runme_ko()
      

      using this groovy library:

      $ cat src/aldebaran/agbuild/MyRunner.groovy 
      package aldebaran.agbuild;
      
      //class MyParameters implements Serializable {
      class MyParameters {
        Boolean sync = true;
      }
      def runme_ko() {
        stage name: 'run_stage', concurrency: 10
        def myparams = new MyParameters();
        node("qisrc") {
          if (true) {
            echo "runme_ko: before"
            sh 'echo toto'
            echo "runme_ko: after"
          }
        }
      }
      

      There is a bug in my groovy library: MyParameters is not serializable.

      The job fails because of that bug, but without printing a backtrace, which make the problem hard to find.

      Here is the job output:

      Started by user anonymous
      Running: run_stage
      Entering stage run_stage
      Proceeding
      Running: Allocate node : Start
      Running on qisrc in /home/jenkins/jenkins/workspace/agility-next@4
      Running: Allocate node : Body : Start
      Running: Print Message
      runme_ko: before
      Running: Shell Script
      [agility-next@4] Running shell script
      Running: Allocate node : Body : End
      Running: End of Workflow
      Finished: FAILURE

      Note that sometimes (when I modify the library, I think) a backtrace is printed.

            jglick Jesse Glick
            sbarthelemy Sébastien Barthélémy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: