aws-toolkit-azure-devops
aws-toolkit-azure-devops copied to clipboard
CloudFormationCreateOrUpdateStack task doesn't use timeoutInMins parameter
Describe the bug
CloudFormationCreateOrUpdateStack has a documented "timeoutInMins" parameter, which is how long it will wait for the stack to reach UPDATE_COMPLETE state.
However, setting this parameter has no effect, it will always wait for a maximum of 60 minutes.
Looking at the code in /Tasks/CloudFormationCreateOrUpdateStack/TaskParameters.ts
, it seems like parameters.timeoutInMins
is always set to defaultTimeoutInMins
, it is never read from the inputs.
To reproduce
- Create a CloudFormation template that takes over 1 hour to deploy (in our case, we are updating an RDS cluster based on a large snapshot).
- Create a pipeline to deploy the template using the CloudFormationCreateOrUpdateStack, setting the
timeoutInMins
parameter to120
. - Run the pipeline. It will timeout after 60 minutes.
Alternatively, if you set timeoutInMins
to a very short time, e.g. 2 minutes, it should also continue to run for 60 minutes due to the bug.
Expected behavior
The deployment task should complete, or timeout after the set number of minutes.
Your Environment
- On-prem or cloud based?: Cloud based
- Azure DevOps version:
- AWS Toolkit for Azure DevOps version: 1.8.0
I have done some more testing and it appears to be working as expected when I create a stack, but it fails when I update an existing stack.
When I create a new stack, I see the message Setting maximum wait period for stack creation/update to 120 minutes
in the task output. When I am updating, I do not.
Hi, My guess is that this bug fix is as quick as to get these two file updated with the example attached here. Can a contributor review it and merge it, please?
cloudformationutils.ts.txt TaskOperations.ts.txt
NOTE: I had to rename them as .txt otherwise I could not upload them in here.
Thanks and BR, Michele