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
empty can’t be used to check if string value queries have an empty string ("") defined. exists - Checks if each occurrence of the query has a value and can be used in place of != null.
To Reproduce
Actually, empty can be used to check if string value queries have an empty string ("") defined.
Hi @yukihiko-shinoda thank you for posting this detailed issue. I have begun to look into this and I believe the first point isn't a bug, and something that was improved upon but the docs were never updated.
As for the other 2 issues these are indeed strange behaviours. I will continue to track them as bugs and will update this issue as progress is made.
Hi @yukihiko-shinoda this issue has been taken care of as part of #398. We have now added the new is_null operator. The documentation has also been updated to clearly state the expected behaviour of the exists operator.
You can get this functionality currently by building from source or waiting for our next stable release.
I am going to go ahead and close out this issue. Feel free to reopen if need be.
Describe the bug
empty
can be used to check if string value queries have an empty string ("") defined.exists
can't be used in place of!= null
.!= null
returns strange result.cloudformation-guard/docs/CLAUSES.md at a3992cac13d227453945afe8af199faad4e7ca10 · aws-cloudformation/cloudformation-guard · GitHub
To Reproduce
Actually,
empty
can be used to check if string value queries have an empty string ("") defined.test.guard:
test.yml:
cfn-guard test -d guard-files -v
:Actually,
exists
can't be used in place of!= null
.test.guard:
test.yml:
cfn-guard test -d guard-files -v
:!= null
returns strange result.test.guard:
test.yml:
cfn-guard test -d guard-files -v
:Expected behavior
!= null
should FAIL only when query failed or it'snull
Operating System
Debian (Docker Container)
OS Version
GNU/Linux 11 bullseye (Docker Container)
Additional context
Tested by cfn-guard 2.1.4
The text was updated successfully, but these errors were encountered: