Closed laurelmay closed 2 years ago
For this use case I would use the method described here and disable the update workflow (i.e. yarn integ --disable-update-workflow
).
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
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 theUpdateStack
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 impactDependsOn
.This occurs for tests with a
CHANGED
status;NEW
tests are built using the template and the point is mostly moot forUNCHANGED
templates.Reproduction Steps
DependsOn
. For example, #21495. This PR has only a code change with no changes to tests.yarn build+test
CHANGED
status, resulting in a test failureyarn integ --update-on-failed
Possible Solution
When
DependsOn
is the only thing that changes, CloudFormation returns a result with aValidationException
and 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
DependsOn
with 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
Description
without changes to the template; however, I am unsure ifinteg-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.