Add timeout for resource allocation in lock step and freestyle jobs#1010
Merged
github-actions[bot] merged 1 commit intomasterfrom Apr 22, 2026
Merged
Add timeout for resource allocation in lock step and freestyle jobs#1010github-actions[bot] merged 1 commit intomasterfrom
github-actions[bot] merged 1 commit intomasterfrom
Conversation
87b8de3 to
0f2b2fe
Compare
Contributor
|
⏳ Auto-merge countdown: This PR will be auto-approved in 2 day(s) if no review is submitted. |
0a4a270 to
7522000
Compare
Contributor
|
⏸️ Auto-merge countdown PAUSED: CI checks are not passing. The countdown will resume when all checks are green. |
7522000 to
1f79678
Compare
Contributor
|
|
Adds timeoutForAllocateResource and timeoutUnit parameters to the lock() pipeline step and lockTimeout/lockTimeoutUnit to freestyle job resource configuration. When a timeout is set and the resource is not acquired within the specified duration, the pipeline build fails with a LockWaitTimeoutException and the freestyle queue item is cancelled. Implementation uses a single scheduled task targeting the earliest deadline across all queued entries, with a periodic safety-net fallback. Fixes #866 Fixes #849 Fixes #30
1f79678 to
ac136dd
Compare
Contributor
|
✅ Auto-approved: No review received within 3 days. Merging now. |
This was referenced Apr 24, 2026
MarkEWaite
added a commit
to jenkinsci/bom
that referenced
this pull request
Apr 24, 2026
jenkinsci/lockable-resources-plugin#1026 notes that the FreeStyleTimeoutTest fails on Jenkins 2.532 and newer. The test was added in the most recent release (1509.va_6b_5b_5cb_0b_40) as part of pull request: * jenkinsci/lockable-resources-plugin#1010 Issue has been reported to the maintainer as: * jenkinsci/lockable-resources-plugin#1026 Testing done: * Confirmed that the test passes on Jenkins core versions prior to 2.532 and fails consistently on 2.532 and later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds imeoutForAllocateResource and imeoutUnit parameters to the lock() pipeline step, and lockTimeout/lockTimeoutUnit to freestyle job resource configuration (RequiredResourcesProperty).
When a timeout is set and the resource is not acquired within the specified duration:
Implementation
Testing
Documentation
Fixes #866
Fixes #849
Fixes #30