New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws_ec2): Dummy Security Group id has changed #23361
Comments
Apologies for this breaking your test @mickael-caro-sonarsource, This was a deliberate change to avoid a specific issue, see the PR for more information #22859 CC @mrgrain |
Yep, this is by design, and we will not change this. Thanks for letting us know that this happened though, it's a good reminder that every part of our API that people should not be relying on, they do in practice anyway. While we're at it: I strongly recommend against snapshot tests at every occasion for exactly this reason. They always end up testing more than you intended, and therefore end up breaking for unrelated reasons. I'm pretty sure the functional part of your test didn't really care about the security group ID, but you were forced to put Snapshot tests sound like a great idea in theory but in practice require constant human attention, and cause more problems than they solve (in my opinion, that is, I'm sure reasonable people may disagree). |
|
There was also another breaking change with this release: The way the list of subnets ids is generated in the SSM parameter resource has also changed and it broke many tests. @rix0rrr I understand your point but how would we know given the huge scope of the CDK and all the possible use cases that X is not supposed to be tested and Y should? To me, it's not a big deal if my tests fail: it's a way to understand changes that happened on the resources I'm using. It might be nothing or something bigger and I prefer to fail fast and be alerted than to have the impression that the constructs I'm using have not been touched by a release, and then discovering bigger problems later (like a change that looks minor but trigger a resource replacement in Prod). |
Describe the bug
With the new 2.55.0 version, all "dummy" security group ids that are generated from synth for our tests have changed, from sg-12345 to sg-12345678, breaking all of our tests suddenly. Is it a breaking change or something introduced by mistake ?
Expected Behavior
Current Behavior
GroupId here has changed. (same for DestinationGroupId in SecurityGroupEgress
Reproduction Steps
Create a SG egress rule in Python :
Add a snapshot testing :
DestinationSecurityGroupId was sg-12345 until 2.54.0 whereas it's not sg-12345678.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.55.0
Framework Version
No response
Node.js Version
LTS
OS
MacOS 13
Language
Python
Language Version
3.9.13
Other information
No response
The text was updated successfully, but these errors were encountered: