pipeline-aws-plugin
pipeline-aws-plugin copied to clipboard
cfnUpdate Timeout
Description
When using the cfnUpdate step the timeout defaults to 10 mins, the cloudformation takes 13 mins to complete via the console so it will not complete using this plugin.
Steps to Reproduce
Run a Jenkins job with cfnUpdate and parameter timeoutInMinutes
Expected behavior: Timeout is set to the passed value
Actual behavior: Timeout is always 10 minutes (default value)
Environment
Jenkins-Version: 2.164.1
Java-Version: 1.8.0_102
Plugin-Version: 1.37 (current latest)
Master/Slave Setup: Master only, test env
Error message
com.amazonaws.waiters.WaiterTimedOutException: Reached maximum attempts without transitioning to the desired state at com.amazonaws.waiters.WaiterExecution.pollResource(WaiterExecution.java:86) at com.amazonaws.waiters.WaiterImpl.run(WaiterImpl.java:88) at com.amazonaws.waiters.WaiterImpl$1.call(WaiterImpl.java:110) at com.amazonaws.waiters.WaiterImpl$1.call(WaiterImpl.java:106) Caused: java.util.concurrent.ExecutionException at org.apache.http.concurrent.BasicFuture.getResult(BasicFuture.java:71) at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:84) at de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintEvents(EventPrinter.java:161) at de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintStackEvents(EventPrinter.java:109) at de.taimos.pipeline.aws.cloudformation.CloudFormationStack.create(CloudFormationStack.java:124) at de.taimos.pipeline.aws.cloudformation.CFNUpdateStep$Execution.whenStackMissing(CFNUpdateStep.java:110) at de.taimos.pipeline.aws.cloudformation.CFNUpdateStep$Execution.whenStackMissing(CFNUpdateStep.java:88) at de.taimos.pipeline.aws.cloudformation.AbstractCFNCreateStep$Execution.run(AbstractCFNCreateStep.java:130) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE
As described in the readme:
Using timeoutInMinutes you can specify the amount of time that can pass before the stack status becomes CREATE_FAILED and the stack gets rolled back. Due to limitations in the AWS API, this only applies to stack creation.
To rephrase: The AWS SDK does not provide a way to set a timeout for stack updates, only stack creations.
Was the point of the original question to increase the time Jenkins waits for the cfnUpdate to complete? Then it should be possible to implement in Jenkins, regardless of limitations of the AWS API.
I am facing this issue as well. My stack deploys/updates take longer than 10 minutes, and I can't seem to change this behaviour.
It seems that it was reported before: https://github.com/jenkinsci/pipeline-aws-plugin/issues/115
I think this bug snuck back in since it had been resolved before. Or that it was only resolved for creation cfnUpdate calls.