You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn integ-runner --update-on-failed does not result in the new stack being built in CloudFormation; instead only the old snapshot is built because the UpdateStack operation does nothing in this case.
Expected Behavior
yarn integ-runner --update-on-failed tests the new code and the deployed CloudFormation template shown in the CloudFormation console matches the created snapshot.
Current Behavior
yarn integ-runner --update-on-failed builds a CloudFormation stack using the existing snapshot in version control and not one with the new synthesized template when changes to the template don't impact resource properties, such changes that only impact DependsOn.
This occurs for tests with a CHANGED status; NEW tests are built using the template and the point is mostly moot for UNCHANGED templates.
See that there are integration tests with a CHANGED status, resulting in a test failure
Attempt to run yarn integ --update-on-failed
The stacks that are created match the old synthesized CloudFormation templates, not the new ones that will be checked in.
Possible Solution
When DependsOn is the only thing that changes, CloudFormation returns a result with a ValidationException and the message No updates are to be performed.
When that happens, it may be best to build the stack again fresh based off the new CloudFormation template as well. This ensures that updates are no-ops for existing users as expected and that the stack operates as expected for users building it the first time.
Additional Information/Context
This is the command and the output I used when testing the provided PR, #21495, myself.
This may also impact users who change properties such as the stack Description without changes to the template; however, I am unsure if integ-runner is meant to handle that use case.
Arguably, this is a CloudFormation bug/request. Ideally, I'd be able to change the order in which my resources will be deleted without having to make any changes the resources' properties.
Describe the bug
yarn integ-runner --update-on-faileddoes not result in the new stack being built in CloudFormation; instead only the old snapshot is built because theUpdateStackoperation does nothing in this case.Expected Behavior
yarn integ-runner --update-on-failedtests the new code and the deployed CloudFormation template shown in the CloudFormation console matches the created snapshot.Current Behavior
yarn integ-runner --update-on-failedbuilds a CloudFormation stack using the existing snapshot in version control and not one with the new synthesized template when changes to the template don't impact resource properties, such changes that only impactDependsOn.This occurs for tests with a
CHANGEDstatus;NEWtests are built using the template and the point is mostly moot forUNCHANGEDtemplates.Reproduction Steps
DependsOn. For example, fix(ec2): Internet connectivity not established for private subnets #21495. This PR has only a code change with no changes to tests.yarn build+testCHANGEDstatus, resulting in a test failureyarn integ --update-on-failedPossible Solution
When
DependsOnis the only thing that changes, CloudFormation returns a result with aValidationExceptionand the messageNo updates are to be performed.When that happens, it may be best to build the stack again fresh based off the new CloudFormation template as well. This ensures that updates are no-ops for existing users as expected and that the stack operates as expected for users building it the first time.
Additional Information/Context
This is the command and the output I used when testing the provided PR, #21495, myself.
Clearly, all of these should result in CloudFormation stacks that have a
DependsOnwith the listed resources. And that's exactly what does appear in the created template files (such astest/vpn.integ.snapshot/aws-cdk-ec2-vpn.template.json); however, the CloudFormation stack that got built is https://gist.github.com/kylelaker/84816bbfbecdecce9d8d72a947b25eef; the newly created snapshot was https://gist.github.com/09782fc5fbc6afa8b40c01c358f8878e.CDK CLI Version
2.33.0
Framework Version
No response
Node.js Version
16
OS
Linux
Language
Typescript
Language Version
No response
Other information
This may also impact users who change properties such as the stack
Descriptionwithout changes to the template; however, I am unsure ifinteg-runneris meant to handle that use case.Arguably, this is a CloudFormation bug/request. Ideally, I'd be able to change the order in which my resources will be deleted without having to make any changes the resources' properties.