-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Running --stateful
check on schema change, I have a situation where a property is going from accepting only type object to accepting type object or string. This seems like it should be considered backwards-compatible, but guard-rail is currently flagging it as a type change.
Repro steps:
- Pull current IAM Role schema:
aws cloudformation describe-type --type RESOURCE --type-name AWS::IAM::Role | jq -r .Schema > iam-role-schema.json
cp iam-role-schema.json iam-role-schema-modified.json
- Manually modify
iam-role-schema-modified.json
soPolicyDocument
property has"type": "object"
. - Run
guard-rail --schema file:///path/to/iam-role-schema-modified.json --schema file:///path/to/iam-role-schema.json --stateful --format
Expected result
- Schema passes stateful checks.
- Actual result:
[FAILED]:
ENSURE_PROPERTY_TYPE_NOT_CHANGED:
check-id: TP003
message: cannot change TYPE of a property
ammokhov
Metadata
Metadata
Assignees
Labels
No labels