jenkinsci / jenkinsci/lockable-resources-plugin

[JENKINS-55521] Allow for random resource return.

Open
#918 1 comment 0 reactions 0 assignees View on GitHub
component:lockable-resources-plugin imported-jira-issue priority:minor resolution:unresolved Triage
Dominant language
Java
Stars
99
Forks
205
Avg merge
2d 13h
Merged PRs (30d)
8

Description

When getting a resource, I'd like to way to get a random resource. The current behavior seems to return the first on the stack. This ends with one resource getting used more then the others but I'd like to be able to randomize the resource returned.

---
Originally reported by mdelaney, imported from: Allow for random resource return.


  • status: Open
  • priority: Minor
  • component(s): lockable-resources-plugin
  • resolution: Unresolved
  • votes: 5
  • watchers: 5
  • imported: 20251217-081411

Raw content of original issue

When getting a resource, I'd like to way to get a random resource. The current behavior seems to return the first on the stack. This ends with one resource getting used more then the others but I'd like to be able to randomize the resource returned.

environment

```
Jenkins: 1.150.1

Lockable resource plugin: 2.3
```

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating the lockable-resources-plugin resource acquisition path and its existing selection behavior, then inspect related tests. Done means a resource can be selected randomly without breaking current locking behavior, with tests documenting the new option or behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.