feat(cli): hotswap support for resources in nested stacks#18950
feat(cli): hotswap support for resources in nested stacks#18950mergify[bot] merged 41 commits intoaws:masterfrom
Conversation
…sure that resource lookups work
…ent resource type (with the same logical ID) results in a full deployment, and vice versa
…K calls or duplicated code
skinny85
left a comment
There was a problem hiding this comment.
I just skimmed for now (this is quite complex), but one thing stuck out to me.
d8d5cd1 to
8034f84
Compare
There was a problem hiding this comment.
Looks great @comcalvi! I don't have any comments on the functionality, I only have some comments on the code details.
The most important thing I want to see before we merge this in is getting rid of the multiple calls to diff the Stacks. Ideally, we should perform a single diff, that includes the Nested Stacks, and use that for hotswapping. The same way we don't call diff multiple times for the cdk diff command for Nested Stacks.
skinny85
left a comment
There was a problem hiding this comment.
Looks almost perfect! One last iteration, and we'll get this merged in.
| public readonly mockSdkProvider: MockSdkProvider; | ||
|
|
||
| constructor() { | ||
| constructor(rootStackName?: string, childStacks?: string[]) { |
There was a problem hiding this comment.
How about
| constructor(rootStackName?: string, childStacks?: string[]) { | |
| constructor(rootStackName?: string, childStacks: string[] = []) { |
? Will save you the null checks on childStacks below.
There was a problem hiding this comment.
I think we don't actually need childStacks at all, I've reworked this to be better.
| Resources: { | ||
| Bucket: { | ||
| Type: 'AWS::Lambda::Function', | ||
| Type: 'AWS::S3::Bucket', |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Resources in nested stacks can now be hotswapped.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license