• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • lockable-resources 2.3

      The manual reserve feature doesn't work well with the pipeline variable feature. When a user unreserves a resource and the plugin assigns the resource immediately to a queued build, the environment variable won't be correctly set.

      In LockableResourceManager.unreserve, there is a LockStepExecution.proceed call at the end with the variable left null. I have no idea how to retrieve a singular variable to use at this point in the code. 

          [JENKINS-54541] Unreserve doesn't set environment variable

          Falko Modler added a comment - - edited

          Same here, Jenkins ver. 2.138.2 and lockable-resources 2.3.

          This results in a failed build due to groovy.lang.MissingPropertyException: No such property: [...] for class: groovy.lang.Binding

          PS: First, I was irritated by this closed GitHub ticket because I thought it was the same scenario, but it's not!
          That ticket adressed one build waiting for another (to free up the resource), but here we have a job waiting for a manually reserved resource.

          Falko Modler added a comment - - edited Same here, Jenkins ver. 2.138.2 and lockable-resources 2.3. This results in a failed build due to groovy.lang.MissingPropertyException: No such property: [...] for class: groovy.lang.Binding PS: First, I was irritated by this closed GitHub ticket because I thought it was the same scenario, but it's not! That ticket adressed one build waiting for another (to free up the resource), but here we have a job waiting for a manually reserved resource.

          Niels Wegner added a comment -

          As mentioned in JENKINS-50176 this bug will be covered by that bugfix (PR#117) as well

          Niels Wegner added a comment - As mentioned in  JENKINS-50176  this bug will be covered by that bugfix (PR#117) as well

          Falko Modler added a comment -

          Thanks for the pointer, nwegner!

          Falko Modler added a comment - Thanks for the pointer, nwegner !

            tgr Tobias Gruetzmacher
            stevenfoster Steven Foster
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: