Skip to content

fix: fix error thrown when template includes intrinsic function #1532

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

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

philasmar
Copy link
Contributor

@philasmar philasmar commented Jun 16, 2023

Issue #, if available:
DOTNET-4300, #1340

Description of changes:
An error was thrown when a short form intrinsic function appears in a CloudFormation template. This error was due to an invalid casting to Dictionary<string, object>. Modifying this to a Dictionary<string, YamlMappingNode> for YAML templates fixed the issue.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@philasmar philasmar requested review from ashovlin, normj and 96malhar June 16, 2023 20:02
Copy link
Contributor

@96malhar 96malhar left a comment

Choose a reason for hiding this comment

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

Can you also update the unit tests in YamlWriterTests.cs to verify that YAML blobs with intrinsic functions are parsed correctly?

@philasmar philasmar force-pushed the asmarp/ignore-intrinsic-function branch from f1d3449 to 39620bb Compare June 21, 2023 17:07
@philasmar
Copy link
Contributor Author

Can you also update the unit tests in YamlWriterTests.cs to verify that YAML blobs with intrinsic functions are parsed correctly?

I added an intrinsic function to some of the tests, but it doesn't apply to all since this PR is not introducing a fix to parsing intrinsic functions. The PR is updating the Lambda Annotations code so workaround this limitation.

@philasmar philasmar force-pushed the asmarp/ignore-intrinsic-function branch from 39620bb to 4a4480d Compare June 21, 2023 17:13
@philasmar philasmar requested a review from 96malhar June 21, 2023 17:13
@philasmar philasmar force-pushed the asmarp/ignore-intrinsic-function branch from 4a4480d to f78d1b4 Compare June 21, 2023 17:21
@philasmar philasmar force-pushed the asmarp/ignore-intrinsic-function branch from f78d1b4 to ccc3bdc Compare June 22, 2023 15:57
@philasmar philasmar requested a review from normj June 22, 2023 15:57
@philasmar philasmar force-pushed the asmarp/ignore-intrinsic-function branch from ccc3bdc to 783f70d Compare June 22, 2023 19:08
@philasmar philasmar merged commit 8ae881d into dev Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants