Skip to content

Conversation

@joshfried-aws
Copy link
Contributor

Issue #, if available:
#377

Description of changes:
Clarified the description for the exists unary function in guard. Previously said it could be used in place of where a dev would use != null in other languages. The team believes this was slightly misleading. Exists is used to check if a query is resolved, its value doesn't matter (meaning it can be any valid value for guard, including null) and still pass.

On that note we added a way to check if a value is null, using the is_null operator. Doing this we also noticed that even though our docs explicitly state we support an is_float operation, that wasn't previously true. For this reason we added support for an is_float operation as well.

I also noticed a slight bug with the yaml loader, where we would resolve unquoted null and ~ keywords to strings of those values. Now we check the value of a string and match against those 2 before converting to a string value. I also added tests for this case.


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

@joshfried-aws joshfried-aws merged commit 81667cc into aws-cloudformation:main Aug 14, 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.

5 participants