lockable-resources resource autocomplete creates faulty resource names

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Locking a job with a resource name won't work, if using the autocompleted resource name. Two jobs requiring the same lock can be run in parallel.

      Steps to reproduce:

      1. In the Jenkins configuration, create a lockable resource called 'abcd'
      2. Create a new freestyle job, in the configuration choose 'This build requires lockable resources' and type 'ab' to 'Resources'. The autocomplete should now offer you 'abcd', click on that.
      3. Click save.
      4. Build your new project.
      5. Open the console. It should say

      [lockable-resources] acquired lock on [](it should have said acquired lock on [abcd].

      The problem seems to be, that the plugin writes to the jobs config.xml an extra space character, e.g.

      <resourceNames>abcd </resourceNames>

      instead of <resourceNames>abcd</resourceNames>

       

       

            Assignee:
            Unassigned
            Reporter:
            Aleksi Aalto
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: