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

Thread labels in console output don't persist after a node block

      Output after the first node block is not labeled.

      In my use case I call various nodes during a parallel execution step, but here is a contrived example just using the master node:

      threads = ['thread1','thread2']
      def branches = [:]
      for(int i = 0; i < threads.size(); i++) {
      def thread = threads[i]
          branches[thread] = {
              println 'labeled'
              node('master') {println "labeled"}
              println 'not labeled'
              node('master') {println "also not labeled"}
          }
      }
      parallel branches
      

      Results in:

      Running: Execute sub-workflows in parallel : Start
      [thread1] Running: Parallel branch: thread1
      [thread2] Running: Parallel branch: thread2
      [thread1] Running: Print Message
      [thread1] labeled
      [thread1] Running: Allocate node : Start
      [thread1] Running on master in /var/lib/jenkins/workspace/test@3
      [thread2] Running: Print Message
      [thread2] labeled
      [thread2] Running: Allocate node : Start
      [thread2] Running on master in /var/lib/jenkins/workspace/test@4
      [thread1] Running: Allocate node : Body : Start
      [thread2] Running: Allocate node : Body : Start
      [thread1] Running: Print Message
      [thread1] labeled
      Running: Allocate node : Body : End
      [thread2] Running: Print Message
      [thread2] labeled
      Running: Allocate node : Body : End
      Running: Allocate node : End
      Running: Allocate node : End
      Running: Print Message
      not labeled
      Running: Allocate node : Start
      Running on master in /var/lib/jenkins/workspace/test@3
      Running: Print Message
      not labeled
      Running: Allocate node : Start
      Running on master in /var/lib/jenkins/workspace/test@4
      Running: Allocate node : Body : Start
      Running: Allocate node : Body : Start
      Running: Print Message
      also not labeled
      Running: Allocate node : Body : End
      Running: Print Message
      also not labeled
      Running: Allocate node : Body : End
      Running: Allocate node : End
      Running: Allocate node : End
      Running: Execute sub-workflows in parallel : Body : End
      Running: Execute sub-workflows in parallel : Body : End
      Running: Execute sub-workflows in parallel : End
      Running: End of Workflow
      Finished: SUCCESS
      

          [JENKINS-28222] Thread labels in console output don't persist after a node block

          Anshu Arya created issue -
          Anshu Arya made changes -
          Link New: This issue depends on JENKINS-26122 [ JENKINS-26122 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-26122 [ JENKINS-26122 ]
          Jesse Glick made changes -
          Link Original: This issue depends on JENKINS-26122 [ JENKINS-26122 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 163050 ] New: JNJira + In-Review [ 181076 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-job-plugin [ 21716 ]
          Component/s Original: pipeline [ 21692 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-27394 [ JENKINS-27394 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-34501 [ JENKINS-34501 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            anshuarya Anshu Arya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: