mirror of
https://github.com/floci-io/floci.git
synced 2026-12-05 02:58:00 -05:00
A resource handler's model validation checks a list's minItems, maxItems and uniqueItems as it checks a string's length and pattern, so AWS fails an AWS::CloudWatch::ResourceMetricsConfiguration with two MetricSelections before anything is configured. Floci vendored only the string constraints, so such a template reached the service, and the OTelEnrichment provisioner checked uniqueItems by hand. regen_cfn_property_types.py now vendors minItems, maxItems and uniqueItems on every list, with --check anchors for the CloudWatch lists, and cfn-property-types.json is regenerated (no other drift). CfnPropertyTypes.HandlerReader checks them with the schema validator's messages and order: too few, too many, then two the same, ahead of the list's items. "Model validation failed (#/MetricSelections: expected maximum item count: 1, found: 2)". Items are compared once intrinsic functions are resolved and values converted. The ECS handler, which already takes members the schema does not declare, checks none of them. The OTelEnrichment provisioner's own uniqueness check is removed. Items are keyed by their JSON with sorted members, not held in a set of nodes, which slows to comparing each item with every colliding one when a template makes their hashes collide. S3CfnProvisioner's uniqueness check now shares this one.