aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.63k stars 3.91k forks source link

skip uploading assets when there is no diff #20716

Closed rittneje closed 1 year ago

rittneje commented 2 years ago

Describe the feature

cdk deploy should detect whether this is actually a diff for the stack in question before uploading the assets for it. If there isn't then it should skip uploading them.

Use Case

We follow IaC, which means that we always run cdk deploy for all stacks on every build. Consequently, often times there are no changes at all to deploy for a certain stack (or several stacks). But we've noticed that cdk does not detect this until after it uploads the assets to the staging bucket, which wastes time.

Proposed Solution

No response

Other Information

No response

Acknowledgements

CDK version used

2.21.1 (build a6ee543)

Environment details (OS name and version, etc.)

Alpine 3.15, Python 3.9.12

peterwoodworth commented 2 years ago

Thanks for the request @rittneje,

This is being tracked here https://github.com/aws/aws-cdk/issues/18045. There's a proof of concept up for the feature for anyone to take over 🙂

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

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.

rittneje commented 2 years ago

@peterwoodworth #18045 seems completely unrelated to this. That is about cdk watch skipping synthesis. This is about cdk deploy deferring uploading assets until after it has determined there is a diff. Please re-open this issue.

peterwoodworth commented 2 years ago

You're right - I'm not sure what I read initially

rix0rrr commented 1 year ago

Has been implemented already

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

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.