jenkinsci / jenkinsci/durable-task-plugin
[JENKINS-40161] Allow StepExecution.onResume to throw Exception
- Dominant language
- Java
- Stars
- 30
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Change onResume to throw Exception. (Would still be binary-compatible.) FlowExecutionList.ItemListenerImpl.onLoaded would then need to catch exceptions and call StepContext.onFailure. Like AbstractStepExecutionImpl, this would rely on transient fields holding the contextual object; the improvement would be that a failure in StepContext.get would stop anything else in onResume (such as the setupTimer methods in TimeoutStepExecution, SleepStep.Execution, or DurableTaskStep.Execution) from running.
---
Originally reported by
jglick, imported from: Allow StepExecution.onResume to throw Exception
Raw content of original issue
Change onResume to throw Exception. (Would still be binary-compatible.) FlowExecutionList.ItemListenerImpl.onLoaded would then need to catch exceptions and call StepContext.onFailure. Like AbstractStepExecutionImpl, this would rely on transient fields holding the contextual object; the improvement would be that a failure in StepContext.get would stop anything else in onResume (such as the setupTimer methods in TimeoutStepExecution, SleepStep.Execution, or DurableTaskStep.Execution) from running.
Contributor guide
Assessment
This issue has not been assessed yet.