This looks a permission issue.
Steps to reproduce:
- Launch Jenkins 1.642.1.
- Install Cloudbees Folder 5.1
- Install Throttle Concurrent Builds 1.8.4
- Go to Manage Jenkins > Configure System, and add a new Multi-Project Throttle Category:
- Category Name: category
- Maximum Total Concurrent Builds: 0
- Maximum Concurrent Builds Per Node: 1
- Create a folder "folder"
- Create a Freestyle project "test"
- Check "Throttle Concurent Builds":
- Check "Throttle this project as part of one or more categories"
- Maximum Total Concurrent Builds: 0
- Maximum Concurrent Builds Per Node: 1
- Multi-Project Throttle Category: category
- Check "Execute concurrent builds if necessary"
- Add "Execute shell":
- Start a new build of "folder/test"
- After the build started, start a new build of test again.
- Result: test #2 doesn't start till #1 finish.
- Go to Manage Jenkins > Configure Global Security and enable security.
- Check "Enable security"
- Check "Jenkins’ own user database"
- Check "Allow users to sign up"
- Check "Matrix-based security"
- No permissions for Anonymous
- All permissions for "admin"
- Login as admin (signing up)
- Start a new build of "folder/test"
- After the build started, start a new build of test again.
- Result: test #3 and test #4 runs at the same time (throttle-concurrent-builds doesn't work)
This is caused for throttle-cuncurrent-builds works as anonymous when it manages build queues,
and they can't access projects inside folders.
For projects outside folders, throttle-concurrent-builds can access them with a special method
provided by Jenkins core that doesn't perform permission checks.
Workaround: Add Overall/Read and Job/Read permissions to anonymous.
This is critical for me, and I'll work on this issue.
This seems to be occurring in Line 188 of ThrottleJobProperty.java:
Is returning Null when the AbstractProject's parent is a Folder.