jenkinsci / jenkinsci/lockable-resources-plugin

[JENKINS-71247] Support labels without associated resources

Open
#950 2 comments 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

Currently, you need at least one resource for a label.

When I try to lock on a label and no resource exists (yet) for that label, pipeline fails with

 

java.lang.IllegalArgumentException: The resource label does not exist: my_label.

at org.jenkins.plugins.lockableresources.LockStepResource.validate(LockStepResource.java:95)
at org.jenkins.plugins.lockableresources.LockStep.validate(LockStep.java:183)
at org.jenkins.plugins.lockableresources.LockStepExecution.start(LockStepExecution.java:43)

use case:

I want to create a pool of resources (testsystems btw) to be used in a build pipeline. The resources are created on-demand by a separated groovy-script job.

During nighttimes the pool will be completely empty though, and the build pipeline will so fail hard instead of waiting for the next resource

 

---
Originally reported by kutzi, imported from: Support labels without associated resources


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

Raw content of original issue

Currently, you need at least one resource for a label.
When I try to lock on a label and no resource exists (yet) for that label, pipeline fails with

 



java.lang.IllegalArgumentException: The resource label does not exist: my_label.

at org.jenkins.plugins.lockableresources.LockStepResource.validate(LockStepResource.java:95)
at org.jenkins.plugins.lockableresources.LockStep.validate(LockStep.java:183)
at org.jenkins.plugins.lockableresources.LockStepExecution.start(LockStepExecution.java:43)

use case:
I want to create a pool of resources (testsystems btw) to be used in a build pipeline. The resources are created on-demand by a separated groovy-script job.
During nighttimes the pool will be completely empty though, and the build pipeline will so fail hard instead of waiting for the next resource
 

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.