You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not a template bug report per se, but I need a public place to report this bug to you so that I can refer to it from the AWS CDK project. Originally reported here: aws/aws-cdk#13634
The bug is that if we submit a template with non-ASCII characters, CloudFormation properly executes it, but it will break the non-ASCII characters when reading them back through the API (GetTemplate, DescribeStacks). This causes the AWS CDK to always detect changes when a template contains Unicode characters, because the template will contain 請交月報 whereas the template returned by CloudFormation will contain ????.
It is impossible to build correct automation on top of this API behavior
I am reopening this from #25525
and following up on my comments here:
#24557 (comment)#24557 (comment)#25008 (comment)#25008 (comment)#25008 (comment)#25008 (comment)#25008 (comment)#25008 (comment)#25525 (comment)#25525 (comment)
🫠 #25525 (comment) 🫠
---
Fixes#25309Fixes#22203Fixes#20212Fixes#13634Fixes#10523Fixes#10219
See also: aws-cloudformation/cloudformation-coverage-roadmap#1220
See also: aws-cloudformation/cloudformation-coverage-roadmap#814
---
👻 I have retitled this PR as a `chore` instead of a `fix` because @aws-cdk-automation keeps closing my PRs as abandoned even though they are clearly not abandoned.
> This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.
---
@otaviomacedo@rix0rrr@TheRealAmazonKendra - I'm happy to adjust the approach, add more tests, or do what else needs to be done. I'm not getting any feedback from the team so I'm not sure how to proceed. The diff noise with non-ASCII information in cdk diff makes it difficult to find meaningful changes to our stacks.
🗿🗞️📬 **Crucially, this change only affects the CLI output and therefore an integration test isn't possible.**
---
CloudFormation's `GetStackTemplate` irrecoverably mangles any character not in the 7-bit ASCII range. This causes noisy output from `cdk diff` when a template contains non-English languages or emoji. We can detect this case and consider these strings equal.
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Many AWS services accept non-ASCII input, eg many "description" fields. CloudFormation will correctly dispatch these templates but when invoking `GetStackTemplate` the result is mangled. This causes annoying noise in the output of `cdk diff`:
```
Resources
[~] AWS::Lambda::Function Lambda/Resource
└─ [~] Description
├─ [-] ?????
└─ [+] 🤦🏻♂️
```
This change modifies the diff algorithm to consider the string equal if the lvalue is a mangled version of the rvalue.
Of course this runs the risk of hiding changesets which modify only a single non-ASCII character to another non-ASCII character, but these fields already tend to be informative in nature.
Not a template bug report per se, but I need a public place to report this bug to you so that I can refer to it from the AWS CDK project. Originally reported here: aws/aws-cdk#13634
The bug is that if we submit a template with non-ASCII characters, CloudFormation properly executes it, but it will break the non-ASCII characters when reading them back through the API (
GetTemplate
,DescribeStacks
). This causes the AWS CDK to always detect changes when a template contains Unicode characters, because the template will contain請交月報
whereas the template returned by CloudFormation will contain????
.It is impossible to build correct automation on top of this API behavior
Reproduction
Deploy the following template:
Then look at the template or look at the outputs:
The Topic does actually get created with the correct name, so the problem does not happen at ingestion but between execution and returning values:
The text was updated successfully, but these errors were encountered: