aws / aws/aws-toolkit-azure-devops

Cloudformation waitForStackCreation error

Open
#100 7 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

Hi,

We use AWS Cloudformation Create/Update VSTS task to create a stack. The VSTS task waits for the stack status to become "Create_Complete". However, we have noticed that our stack status ends up as "Update_Complete" after becoming "Create_Complete" for a short while (less than 30 seconds).

As a result of the above, the "waitForStackCreation" method throws an exception as the method checks for the stack status every 30 seconds and it misses the stack status that is only there for a short while before becoming "Update_Complete". Please see the stack events below, you will notice that the "Create_Complete" status for AWS::Cloudformation:Stack type changes quickly to "Update_Complete".

28/08/2018 | Status | Type | Logical ID | Status Reason
-- | -- | -- | -- | --
  | 13:08:51 UTC+0100 | UPDATE_COMPLETE | AWS::CloudFormation::Stack | licensingserver-533 |  
  | 13:08:50 UTC+0100 | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | AWS::CloudFormation::Stack | licensingserver-533 |  
  | 13:08:48 UTC+0100 | UPDATE_COMPLETE | AWS::EC2::Instance | EC2Instance |  
  | 13:08:31 UTC+0100 | UPDATE_IN_PROGRESS | AWS::EC2::Instance | EC2Instance |  
  | 13:08:26 UTC+0100 | UPDATE_COMPLETE | AWS::EC2::Volume | NewVolume |  
  | 13:08:11 UTC+0100 | UPDATE_IN_PROGRESS | AWS::EC2::Volume | NewVolume |  
  | 13:07:58 UTC+0100 | UPDATE_IN_PROGRESS | AWS::CloudFormation::Stack | licensingserver-533 | User Initiated
  | 13:07:53 UTC+0100 | CREATE_COMPLETE | AWS::CloudFormation::Stack | licensingserver-533 |  
  | 13:07:50 UTC+0100 | CREATE_COMPLETE | AWS::CloudFormation::WaitCondition | EC2InstanceWaitCondition |  
  | 12:37:38 UTC+0100 | CREATE_IN_PROGRESS | AWS::CloudFormation::WaitCondition | EC2InstanceWaitCondition | Resource creation Initiated
  | 12:37:38 UTC+0100 | CREATE_IN_PROGRESS | AWS::CloudFormation::WaitCondition | EC2InstanceWaitCondition |  
  | 12:37:34 UTC+0100 | CREATE_COMPLETE | AWS::EC2::Instance | EC2Instance |  
  | 12:36:54 UTC+0100 | CREATE_IN_PROGRESS | AWS::EC2::Instance | EC2Instance | Resource creation Initiated
  | 12:36:53 UTC+0100 | CREATE_IN_PROGRESS | AWS::EC2::Instance | EC2Instance |  
  | 12:36:49 UTC+0100 | CREATE_COMPLETE | AWS::EC2::Volume | NewVolume |  
  | 12:36:37 UTC+0100 | CREATE_COMPLETE | Custom::AMIInfo | AMIInfo |  
  | 12:36:37 UTC+0100 | CREATE_IN_PROGRESS | Custom::AMIInfo | AMIInfo | Resource creation Initiated
  | 12:36:33 UTC+0100 | CREATE_IN_PROGRESS | AWS::EC2::Volume | NewVolume | Resource creation Initiated
  | 12:36:32 UTC+0100 | CREATE_IN_PROGRESS | AWS::EC2::Volume | NewVolume |  
  | 12:36:32 UTC+0100 | CREATE_IN_PROGRESS | Custom::AMIInfo | AMIInfo |  
  | 12:36:31 UTC+0100 | CREATE_COMPLETE | AWS::CloudFormation::WaitConditionHandle | EC2InstanceWaitConditionHandle |  
  | 12:36:31 UTC+0100 | CREATE_IN_PROGRESS | AWS::CloudFormation::WaitConditionHandle | EC2InstanceWaitConditionHandle | Resource creation Initiated
  | 12:36:31 UTC+0100 | CREATE_IN_PROGRESS | AWS::CloudFormation::WaitConditionHandle | EC2InstanceWaitConditionHandle |  
  | 12:36:28 UTC+0100 | CREATE_IN_PROGRESS | AWS::CloudFormation::Stack | licensingserver-533 |  

Contributor guide

Open the contributing guide

Research direction

Start at the waitForStackCreation method in the VSTS CloudFormation Create/Update task and review how it polls stack status. Reproduce the reported transition from CREATE_COMPLETE to UPDATE_COMPLETE, then verify that the task completes successfully when that transition occurs between polls.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.