fix: Make BecauseResourcesTimeout fatal to fix freestyle lock timeout on Jenkins 2.532+#1027
Merged
mPokornyETM merged 2 commits intomasterfrom Apr 27, 2026
Merged
Conversation
… on Jenkins 2.532+ Jenkins 2.532 (core PR #11173) changed Queue.maintain() to create a new BlockedItem instead of updating the existing one when canRun() returns a CauseOfBlockage. This caused the manual Queue.cancel() in checkFreestyleTimeout() to be immediately undone. Override isFatal() returning true on BecauseResourcesTimeout so the queue itself handles the cancellation. Also bump Jenkins baseline to 2.541 (the next LTS line that includes the isFatal() API) and update BOM accordingly. Fixes #1026
Contributor
Author
|
@MarkEWaite I hope this helps. |
MarkEWaite
approved these changes
Apr 26, 2026
Contributor
MarkEWaite
left a comment
There was a problem hiding this comment.
Thanks! I confirmed that it passes the tests in the plugin BOM.
Contributor
Author
|
@MarkEWaite thx for rising the issue and you fast response |
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
Jenkins 2.532 (core PR jenkinsci/jenkins#11173) changed
Queue.maintain()to create a newBlockedIteminstead of updating the existing one whencanRun()returns aCauseOfBlockage. This caused the manualQueue.cancel()incheckFreestyleTimeout()to be immediately undone, so the freestyle lock timeout never actually removed the queue item.Fix
isFatal()returningtrueonBecauseResourcesTimeout, so the queue itself handles the cancellation via the new mechanism.isFatal()API from core PR #11173).6364.v16b_76a_4023c7(latest for bom-2.541.x).The existing manual
Queue.cancel()call incheckFreestyleTimeoutis kept as belt-and-suspenders.Fixes #1026