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

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

      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
      

          [JENKINS-71270] Lock resources immediately releases them and locked resources variable is not created

          carlos novo added a comment -

          The issue was reproducible with a minimum pipeline using a lockable resource.
          Forcing a "save" in the "Global Configuration" page, made the lockable resources to work again.

          carlos novo added a comment - The issue was reproducible with a minimum pipeline using a lockable resource. Forcing a "save" in the "Global Configuration" page, made the lockable resources to work again.

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

              Created:
              Updated:
              Resolved: