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

Can not lock on Labels in Free-flow jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Lockable Resources plugin release 2.0 @ Jenkins 2.57

      Originally documented on the plugin's documentation page in Confluence - probably with better formatting than here.

      Also reported on Github here

      The current 2.0 version does apparently not work with labels, when used in a free-flow job!

      I set up a small test scenario to play with, and it seems like waiting for resources works, but not waiting for Labels.

      My tests below:
      I used a resource named TEST, with two labels TEST_1 and TEST_2.
      Looking at the available resources, it's reported that I have the "TEST" resource, and one instance of the two labels - as expected.
      In a free-flow job, I enable This build requires lockable resources, and the tested the following four setups:

      Trial 1
      Resources = TEST
      Number of resources to request = 0
      Expectation: The resource TEST and all labels consumed during the test.
      On execution:
      The test project does not wait for anything.
      None of the resources nor labels are reported used.
      Note: This might be correct behaviour - provided 0 is used literal, unlike documented in the plugin: "empty value or 0 means all "

      Trial 2
      Resources = "TEST"
      Number of resources to request = 1
      Expectation: All labels on the TEST resource will be consumed.
      On execution:
      The test project does wait for the TEST resource and does consume all Labels.

      Trial 3
      Lable = "TEST_1"
      Number of resources to request = 0
      Expectation: The TEST_1 label will be consumed, leaving "TEST_2" available.
      On execution:
      The test project does not wait for anything.
      None of the resources nor labels are reported used.
      Note: This might be correct behaviour - provided 0 is used literal, unlike documented in the plugin: "empty value or 0 means all "

      Trial 4
      Lable = "TEST_1"
      Number of resources to request = 1
      Expectation: The TEST_1 label will be consumed, leaving "TEST_2" available.
      On execution:
      The test project does not wait for anything.
      None of the resources nor labels are reported used.
      Trial 4 is the error I'm really concerned about, as it seems to indicate that only resources can be taken, and not labels.

            Unassigned Unassigned
            fsteff Flemming Steffensen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: