-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.46.2 LTS
workflow-basic-steps 2.4
The 'retry' step was updated in 2.4 to handle exceptions correctly when a user aborts a build.
However, when an 'input' step is included within the 'retry' block, clicking 'Abort' on the input prompt does not abort the build; the input prompt reappears, per the number of retries set.
node('linux') { stage('one') { sleep 5 } stage('two') { retry(3) { input 'proceed?' sleep 5 } } }
This issue also occurs when a milestone step from a subsequent/newer build (user OKs the input for the pipeline to proceed) causes a FlowInterruptedException. The retry still catches this, and re-prompts the input:
node('linux') { stage('one') { sleep 5 } milestone() stage('two') { retry(3) { input 'proceed?' sleep 30 } } milestone() stage('three') { sleep 5 } milestone() }
Here's the relevant console log of build #8, which is waiting for input, when the input on build #9 is OKed:
[Pipeline] input proceed? Proceed or Abort Superseded by PIPELINE_retry-abort-test#9 [Pipeline] } ERROR: Execution failed org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.support.steps.input.InputStepExecution.doAbort(InputStepExecution.java:225) at org.jenkinsci.plugins.workflow.support.steps.input.InputStepExecution$1$1.run(InputStepExecution.java:97) at hudson.security.ACL.impersonate(ACL.java:243) at org.jenkinsci.plugins.workflow.support.steps.input.InputStepExecution$1.run(InputStepExecution.java:95) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Retrying [Pipeline] { [Pipeline] input proceed? Proceed or Abort Click here to forcibly terminate running steps
- is duplicated by
-
JENKINS-53896 Aborting durable task step doesn't work with Retry
- Resolved
- relates to
-
JENKINS-41276 Abort doesn't work with Retry
- Resolved
-
JENKINS-60354 Updated pipeline build step does not work with retry, catchError, or warnError
- Resolved
- links to