Skip to content
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

Removes carriage return characters from CF stacks during normalize #14270

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

tmarlok88
Copy link
Contributor

@tmarlok88 tmarlok88 commented Jul 21, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #10382

Release note for CHANGELOG:

NONE

@tmarlok88 tmarlok88 requested a review from a team July 21, 2020 12:54
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels Jul 21, 2020
@tmarlok88 tmarlok88 force-pushed the b-crlf_in_cf_stack branch 2 times, most recently from 9546512 to e97bd99 Compare October 17, 2020 10:39
Base automatically changed from master to main January 23, 2021 00:58
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:58
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 21, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@github-actions github-actions bot added verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) and removed provider Pertains to the provider itself, rather than any interaction with AWS. labels Nov 14, 2021
@ewbankkit ewbankkit added the service/cloudformation Issues and PRs that pertain to the cloudformation service. label Aug 4, 2022
@YakDriver YakDriver self-assigned this Apr 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 12, 2024
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT 🎉

% TF_ACC=1 go1.21.8 test ./internal/verify/... -v -count 1 -parallel 20
=== RUN   TestSuppressEquivalentRoundedTime
=== PAUSE TestSuppressEquivalentRoundedTime
=== RUN   TestLooksLikeJSONString
=== PAUSE TestLooksLikeJSONString
=== RUN   TestJSONBytesEqualQuotedAndUnquoted
=== PAUSE TestJSONBytesEqualQuotedAndUnquoted
=== RUN   TestJSONBytesEqualWhitespaceAndNoWhitespace
=== PAUSE TestJSONBytesEqualWhitespaceAndNoWhitespace
=== RUN   TestSecondJSONUnlessEquivalent
=== PAUSE TestSecondJSONUnlessEquivalent
=== RUN   TestNormalizeJSONOrYAMLString
=== PAUSE TestNormalizeJSONOrYAMLString
=== RUN   TestSuppressEquivalentJSONDiffsWhitespaceAndNoWhitespace
=== PAUSE TestSuppressEquivalentJSONDiffsWhitespaceAndNoWhitespace
=== RUN   TestSuppressEquivalentJSONOrYAMLDiffs
=== PAUSE TestSuppressEquivalentJSONOrYAMLDiffs
=== RUN   TestLegacyPolicyNormalize
=== PAUSE TestLegacyPolicyNormalize
=== RUN   TestSemVerLessThan
=== PAUSE TestSemVerLessThan
=== RUN   TestSemVerGreaterThanOrEqual
=== PAUSE TestSemVerGreaterThanOrEqual
=== RUN   TestValidAmazonSideASN
=== PAUSE TestValidAmazonSideASN
=== RUN   TestValid4ByteASNString
=== PAUSE TestValid4ByteASNString
=== RUN   TestValidTypeStringNullableFloat
=== PAUSE TestValidTypeStringNullableFloat
=== RUN   TestValidAccountID
=== PAUSE TestValidAccountID
=== RUN   TestValidARN
=== PAUSE TestValidARN
=== RUN   TestValidCIDRNetworkAddress
=== PAUSE TestValidCIDRNetworkAddress
=== RUN   TestValidIPv4CIDRBlock
=== PAUSE TestValidIPv4CIDRBlock
=== RUN   TestValidIPv6CIDRBlock
=== PAUSE TestValidIPv6CIDRBlock
=== RUN   TestIsIPv4CIDRBlockOrIPv6CIDRBlock
=== PAUSE TestIsIPv4CIDRBlockOrIPv6CIDRBlock
=== RUN   TestValidIAMPolicyJSONString
=== PAUSE TestValidIAMPolicyJSONString
=== RUN   TestValidStringIsJSONOrYAML
=== PAUSE TestValidStringIsJSONOrYAML
=== RUN   TestValidOnceAWeekWindowFormat
=== PAUSE TestValidOnceAWeekWindowFormat
=== RUN   TestValidOnceADayWindowFormat
=== PAUSE TestValidOnceADayWindowFormat
=== RUN   TestValidLaunchTemplateName
=== PAUSE TestValidLaunchTemplateName
=== RUN   TestValidLaunchTemplateID
=== PAUSE TestValidLaunchTemplateID
=== RUN   TestValidUTCTimestamp
=== PAUSE TestValidUTCTimestamp
=== RUN   TestValidateTypeStringIsDateOrInt
=== PAUSE TestValidateTypeStringIsDateOrInt
=== RUN   TestFloatGreaterThan
=== PAUSE TestFloatGreaterThan
=== RUN   TestValidServicePrincipal
=== PAUSE TestValidServicePrincipal
=== RUN   TestMapLenBetween
=== PAUSE TestMapLenBetween
=== RUN   TestMapKeysAre
=== PAUSE TestMapKeysAre
=== RUN   TestCheckYAMLString
=== PAUSE TestCheckYAMLString
=== CONT  TestSuppressEquivalentRoundedTime
=== CONT  TestValidIPv4CIDRBlock
--- PASS: TestSuppressEquivalentRoundedTime (0.00s)
=== CONT  TestValidCIDRNetworkAddress
--- PASS: TestValidIPv4CIDRBlock (0.00s)
--- PASS: TestValidCIDRNetworkAddress (0.00s)
=== CONT  TestSecondJSONUnlessEquivalent
=== CONT  TestValidAccountID
=== CONT  TestValidTypeStringNullableFloat
=== CONT  TestValid4ByteASNString
--- PASS: TestValid4ByteASNString (0.00s)
=== CONT  TestValidAmazonSideASN
=== CONT  TestSemVerGreaterThanOrEqual
=== CONT  TestJSONBytesEqualQuotedAndUnquoted
=== CONT  TestJSONBytesEqualWhitespaceAndNoWhitespace
=== CONT  TestValidOnceAWeekWindowFormat
=== CONT  TestValidLaunchTemplateID
=== CONT  TestCheckYAMLString
=== CONT  TestValidOnceADayWindowFormat
=== CONT  TestMapKeysAre
=== CONT  TestValidIPv6CIDRBlock
=== CONT  TestValidIAMPolicyJSONString
=== RUN   TestValidIAMPolicyJSONString/{}
=== RUN   TestMapKeysAre/ok
=== CONT  TestSemVerLessThan
=== CONT  TestMapLenBetween
=== RUN   TestMapLenBetween/too_long
=== CONT  TestLegacyPolicyNormalize
=== CONT  TestValidServicePrincipal
=== CONT  TestSuppressEquivalentJSONOrYAMLDiffs
=== CONT  TestFloatGreaterThan
=== CONT  TestSuppressEquivalentJSONDiffsWhitespaceAndNoWhitespace
=== CONT  TestValidateTypeStringIsDateOrInt
=== CONT  TestNormalizeJSONOrYAMLString
=== CONT  TestValidARN
=== CONT  TestValidUTCTimestamp
=== CONT  TestLooksLikeJSONString
--- PASS: TestValidTypeStringNullableFloat (0.00s)
--- PASS: TestValidAccountID (0.00s)
--- PASS: TestValidAmazonSideASN (0.00s)
--- PASS: TestJSONBytesEqualQuotedAndUnquoted (0.00s)
=== CONT  TestValidStringIsJSONOrYAML
--- PASS: TestValidARN (0.00s)
--- PASS: TestLooksLikeJSONString (0.00s)
=== CONT  TestValidLaunchTemplateName
--- PASS: TestJSONBytesEqualWhitespaceAndNoWhitespace (0.00s)
=== CONT  TestIsIPv4CIDRBlockOrIPv6CIDRBlock
=== PAUSE TestValidIAMPolicyJSONString/{}
=== PAUSE TestMapKeysAre/ok
=== RUN   TestLegacyPolicyNormalize/basic
=== RUN   TestValidIAMPolicyJSONString/{"abc":["1","2"]}
=== RUN   TestMapKeysAre/not_ok
=== PAUSE TestLegacyPolicyNormalize/basic
=== PAUSE TestMapKeysAre/not_ok
=== RUN   TestLegacyPolicyNormalize/normalWhitespace
=== CONT  TestMapKeysAre/ok
=== PAUSE TestLegacyPolicyNormalize/normalWhitespace
=== CONT  TestMapKeysAre/not_ok
=== RUN   TestLegacyPolicyNormalize/badJSON
=== PAUSE TestLegacyPolicyNormalize/badJSON
--- PASS: TestValidateTypeStringIsDateOrInt (0.00s)
--- PASS: TestSemVerGreaterThanOrEqual (0.00s)
=== PAUSE TestMapLenBetween/too_long
--- PASS: TestValidLaunchTemplateID (0.00s)
--- PASS: TestValidOnceAWeekWindowFormat (0.00s)
=== RUN   TestLegacyPolicyNormalize/principal
--- PASS: TestValidOnceADayWindowFormat (0.00s)
=== RUN   TestMapLenBetween/too_short
--- PASS: TestValidIPv6CIDRBlock (0.00s)
=== PAUSE TestLegacyPolicyNormalize/principal
=== PAUSE TestMapLenBetween/too_short
=== RUN   TestLegacyPolicyNormalize/id
=== RUN   TestMapLenBetween/ok
--- PASS: TestCheckYAMLString (0.00s)
=== PAUSE TestValidIAMPolicyJSONString/{"abc":["1","2"]}
=== PAUSE TestMapLenBetween/ok
=== CONT  TestMapLenBetween/too_long
=== RUN   TestValidIAMPolicyJSONString/{0:"1"}
=== CONT  TestMapLenBetween/ok
--- PASS: TestSemVerLessThan (0.00s)
=== PAUSE TestValidIAMPolicyJSONString/{0:"1"}
--- PASS: TestFloatGreaterThan (0.00s)
=== RUN   TestValidIAMPolicyJSONString/{'abc':1}
=== PAUSE TestValidIAMPolicyJSONString/{'abc':1}
--- PASS: TestValidServicePrincipal (0.00s)
=== RUN   TestValidIAMPolicyJSONString/{"def":}
--- PASS: TestSuppressEquivalentJSONDiffsWhitespaceAndNoWhitespace (0.00s)
--- PASS: TestSecondJSONUnlessEquivalent (0.00s)
=== PAUSE TestValidIAMPolicyJSONString/{"def":}
--- PASS: TestNormalizeJSONOrYAMLString (0.00s)
=== RUN   TestValidIAMPolicyJSONString/{"xyz":[}}
--- PASS: TestValidUTCTimestamp (0.00s)
--- PASS: TestValidLaunchTemplateName (0.00s)
=== PAUSE TestValidIAMPolicyJSONString/{"xyz":[}}
=== RUN   TestValidIAMPolicyJSONString/#00
=== PAUSE TestValidIAMPolicyJSONString/#00
=== CONT  TestMapLenBetween/too_short
=== RUN   TestValidIAMPolicyJSONString/"blub"
=== PAUSE TestValidIAMPolicyJSONString/"blub"
--- PASS: TestValidStringIsJSONOrYAML (0.00s)
=== RUN   TestValidIAMPolicyJSONString/"../some-filename.json"
=== PAUSE TestLegacyPolicyNormalize/id
=== PAUSE TestValidIAMPolicyJSONString/"../some-filename.json"
--- PASS: TestSuppressEquivalentJSONOrYAMLDiffs (0.00s)
=== RUN   TestLegacyPolicyNormalize/newOrder
=== RUN   TestValidIAMPolicyJSONString/"{\"Version\":\"...\"}"
=== PAUSE TestLegacyPolicyNormalize/newOrder
=== RUN   TestLegacyPolicyNormalize/complex1
--- PASS: TestMapKeysAre (0.00s)
    --- PASS: TestMapKeysAre/ok (0.00s)
    --- PASS: TestMapKeysAre/not_ok (0.00s)
=== PAUSE TestLegacyPolicyNormalize/complex1
=== RUN   TestLegacyPolicyNormalize/complex2
=== PAUSE TestValidIAMPolicyJSONString/"{\"Version\":\"...\"}"
=== PAUSE TestLegacyPolicyNormalize/complex2
=== RUN   TestValidIAMPolicyJSONString/[{}]
=== CONT  TestLegacyPolicyNormalize/basic
--- PASS: TestIsIPv4CIDRBlockOrIPv6CIDRBlock (0.00s)
=== CONT  TestLegacyPolicyNormalize/id
--- PASS: TestMapLenBetween (0.00s)
    --- PASS: TestMapLenBetween/too_long (0.00s)
    --- PASS: TestMapLenBetween/ok (0.00s)
    --- PASS: TestMapLenBetween/too_short (0.00s)
=== CONT  TestLegacyPolicyNormalize/badJSON
=== CONT  TestLegacyPolicyNormalize/principal
=== CONT  TestLegacyPolicyNormalize/normalWhitespace
=== CONT  TestLegacyPolicyNormalize/newOrder
=== CONT  TestLegacyPolicyNormalize/complex1
=== CONT  TestLegacyPolicyNormalize/complex2
=== PAUSE TestValidIAMPolicyJSONString/[{}]
=== RUN   TestValidIAMPolicyJSONString/{"a":"foo","a":"bar"}
=== PAUSE TestValidIAMPolicyJSONString/{"a":"foo","a":"bar"}
=== CONT  TestValidIAMPolicyJSONString/{}
=== CONT  TestValidIAMPolicyJSONString/#00
=== CONT  TestValidIAMPolicyJSONString/{"abc":["1","2"]}
=== CONT  TestValidIAMPolicyJSONString/{"a":"foo","a":"bar"}
=== CONT  TestValidIAMPolicyJSONString/"{\"Version\":\"...\"}"
=== CONT  TestValidIAMPolicyJSONString/"blub"
=== CONT  TestValidIAMPolicyJSONString/"../some-filename.json"
=== CONT  TestValidIAMPolicyJSONString/{"xyz":[}}
=== CONT  TestValidIAMPolicyJSONString/[{}]
=== CONT  TestValidIAMPolicyJSONString/{"def":}
--- PASS: TestLegacyPolicyNormalize (0.00s)
    --- PASS: TestLegacyPolicyNormalize/badJSON (0.00s)
    --- PASS: TestLegacyPolicyNormalize/basic (0.00s)
    --- PASS: TestLegacyPolicyNormalize/normalWhitespace (0.00s)
    --- PASS: TestLegacyPolicyNormalize/id (0.00s)
    --- PASS: TestLegacyPolicyNormalize/newOrder (0.00s)
    --- PASS: TestLegacyPolicyNormalize/complex2 (0.00s)
    --- PASS: TestLegacyPolicyNormalize/complex1 (0.00s)
    --- PASS: TestLegacyPolicyNormalize/principal (0.00s)
=== CONT  TestValidIAMPolicyJSONString/{'abc':1}
=== CONT  TestValidIAMPolicyJSONString/{0:"1"}
--- PASS: TestValidIAMPolicyJSONString (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/#00 (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/"{\"Version\":\"...\"}" (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/"blub" (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{"a":"foo","a":"bar"} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/"../some-filename.json" (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{"xyz":[}} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/[{}] (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{"def":} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{"abc":["1","2"]} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{'abc':1} (0.00s)
    --- PASS: TestValidIAMPolicyJSONString/{0:"1"} (0.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/verify	0.117s

@YakDriver YakDriver merged commit c55d4f7 into hashicorp:main Apr 12, 2024
31 checks passed
@github-actions github-actions bot added this to the v5.46.0 milestone Apr 12, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 19, 2024
Copy link

This functionality has been released in v5.46.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudformation Issues and PRs that pertain to the cloudformation service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform 12: crlf line ending in template_body of aws_cloudformation_stack causes changes
5 participants