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

Lock resources immediately releases them and locked resources variable is not created

XMLWordPrintable

      pipeline snippet below was working on 3.303
      After upgrade to 2.387.3, the locked resources are immediately released and not even the first line in the block is reached. Is the lock() crashing?

      lock(label: "LABEL_A", quantity: 3 variable: 'LOCKED_RESOURCES',
             extra: [[label: 'LABEL_B',quantity: 2]])
          {
          // this line is not printed and resources are inmedately released
          println(">>>>>>>>>>>>>>>>> after  lock")
          do_pipeline()
          } 
      13:50:48  Trying to acquire lock on [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  Lock acquired on [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  [Pipeline] {
      13:50:48  [Pipeline] }  // println and do_pipeline should happen here
      13:50:48  Lock released on resource [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  [Pipeline] // lock
      

            Unassigned Unassigned
            bitelxux carlos novo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: