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

The resources do not persist reservation when reload JCasC configuration

XMLWordPrintable

      Hello,

      I hit an issue with Lockable resources plugin (2.8) together with JCasC configuration (Jenkins 2.277.2).

      We define our resources in JCasC and then some of our jobs are locking and releasing these statically defined resources.

      unclassified:
        lockableResourcesManager:
          declaredResources:
            - description: "My resource 1"
              labels: res1
              name: res1
      # I omit the reservedBy field on the purpose in the hope that jcasc will not re-configure it
      

      Unfortunately every time the JCasC configuration is reloaded it resets/release all reservations of resources. I don't set the reservedBy field in our JCasC, in that way I was hoping that it will not touch that value, but that is not a case.

      I also tried to set reservedBy to null, if it helps but unfortunately it doesn't.

      unclassified:
        lockableResourcesManager:
          declaredResources:
            - description: "My resource 1"
              labels: res1
              name: res1
              reservedBy: null
      

      Maybe I am doing something wrong. What can I do to persist current status of reserved resources?

            Unassigned Unassigned
            lukas_bednar Lukas Bednar
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: