lockable-resources-plugin
lockable-resources-plugin copied to clipboard
standard exception handling altered in a lock context
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
@AlexanderStohr can you confirm this issue also in the latest released plugin version? 2.18 version is pretty old one.
i don't have a matching runtime handy.
Ok, I will try it.