Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
-
workflow-durable-task-step 2.24
Description
When a workflow is manually aborted in Jenkins it fires a hudson.AbortException. This is the same thing that happens when a step fails. Thus, it's impossible to properly set the build status to ABORTED on a manual abort and to FAILED on a failed step because you can't programmatically tell the difference.
jglick’s recommended fix: see comment as of 2017-06-28
Attachments
Issue Links
- is duplicated by
-
JENKINS-41944 Unable to understand when AbortError is created by user`s action like pressing button Stop
-
- Resolved
-
-
JENKINS-34376 Cannot easily/safely catch exceptions without disrupting job abortion
-
- Resolved
-
-
JENKINS-37724 Record cause of interruption in DurableTaskStep
-
- Resolved
-
- relates to
-
JENKINS-51928 Timeout is caught by the most internal try-catch, but should be caught by the try-catch that surrounds the timeout step
-
- Resolved
-
- links to
Fixed in Pipeline Nodes and Processes 2.24. See my comment here for an overview of the changes, but in short, externally aborted tasks should throw FlowInterruptedException, while tasks that fail in the script itself should throw AbortException.