winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.99k stars 196 forks source link

Require active acknowledgement for destructive breaking changes #3496

Open skorfmann opened 1 year ago

skorfmann commented 1 year ago

Feature Spec

Wing is now notifying you about breaking changes around resource names. It'll require an active acknowlegement from the users, to make sure users are aware of breaking changes when upgrading Winglang.

Example

When an upgrade requires a change to the generated resource names, this will have an impact on already deployed resources and will recreate them on the next terraform apply run.

before: aws_cloudfront_distribution.root_ReverseProxyDistribution_awscloudfrontDistributionCloudfrontDistribution_84C32E59
after:  aws_cloudfront_distribution.ReverseProxyDistribution_awscloudfrontDistributionCloudfrontDistribution_0718AE05

Depending on the type of the resource, this can be acceptable. However, for stateful resources it's usually not. In these cases manual steps can be considered to preserve the existing resource (e.g. terraform move block or manually renaming the resource in the Terraform state)

Use Cases

Implementation Notes

This could go in a similar direction of these

Component

CLI

Community Notes

skorfmann commented 1 year ago

sidenote: we actually had this happen in the "website proxy" project. Only stateless resources in this case. Even though there were automatic diffs in the pull request, it was not easy to spot what the actual cause for recreating the entire stack was. A feature like this could have helped significantly.

github-actions[bot] commented 1 year ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 7 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

staycoolcall911 commented 7 months ago

Related #901

github-actions[bot] commented 3 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!