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

Can not lock on Labels in Free-flow jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      Lockable Resources plugin release 2.0 @ Jenkins 2.57
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          fsteff Flemming Steffensen added a comment -

          This turned out to be a misunderstanding, based on poor documentation and conflicting/misleading help in the plugin.

          Has been verified to be fully in order on version 2.3

          Show
          fsteff Flemming Steffensen added a comment - This turned out to be a misunderstanding, based on poor documentation and conflicting/misleading help in the plugin. Has been verified to be fully in order on version 2.3

            People

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

              Dates

              • Created:
                Updated:
                Resolved: