jenkinsci / jenkinsci/lockable-resources-plugin

standard exception handling altered in a lock context

Open
#478 3 comments 0 reactions 0 assignees View on GitHub
Clarification needed Triage
Dominant language
Java
Stars
99
Forks
205
Avg merge
2d 13h
Merged PRs (30d)
8

Description

### Jenkins and plugins versions report

for my test cases i found/assume that when i am inside a lock
the standard exception handling is replace by the lock call.
thus where i formerly might have seen some error message
and a hint for the exact line of trouble (or even a stack trace)
i am now getting only outputs that do hint for the lock
being returned - and a "FAILED" error is reported at the very end of my pipeline.

also i feel that cases where the lock fails (e.g. empty string passed to the label: parameter; or no such label found...)
there is no good chance to locate and tell about the failure of lock-reservation - no such messages, just an overall failure.

### What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins 2.346.3 on Linux
lock plugin 2.18

### Reproduction steps

setup a pipeline
use the lock() { ... } command
raise failures, such as empty label, non-registered label, an exception in the clamped block...

### Expected Results

sufficient outputs to know about the error in the enclosed block

sufficient outputs when the lock itself failed for whatever reason

### Actual Results

the lock function call just silently fails and terminates the build - also hiding all other failures that lead to the error state.

### Anything else?

_No response_

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.