Skip to content

Fix condition, resource, and ECS Fargate validation - #241

Closed
satyakigh wants to merge 5 commits into
mainfrom
misc-bug-fixes
Closed

Fix condition, resource, and ECS Fargate validation#241
satyakigh wants to merge 5 commits into
mainfrom
misc-bug-fixes

Conversation

@satyakigh

@satyakigh satyakigh commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

This change improves shared template validation and aligns ECS Fargate behavior across the CEL and Rego engines.

  • Validate malformed condition bodies and resource attributes during semantic-model construction.
  • Prevent a crash when a condition body is an empty object.
  • Add Fargate validation for required properties, network mode, CPU sizes, placement constraints, log drivers, and CPU/memory combinations.
  • Share string-or-integer coercion and custom-resource detection across validation layers.
  • Improve diagnostic resource paths and source locations.

An empty condition body reached an arm that quoted the body's first key,
panicking on a body that has no keys. It now falls to the shape arm and is
reported like any other body that is not a condition function.

The Fargate task-size rules also read a declared size differently in each
engine. Both now share one notion of a written scalar through the coercion
module, match the CPU-unit spelling exactly (Fargate offers a fixed set of Cpu
values, so a padded '0512' names none of them), and read Memory as the number
it denotes. A value written in any other shape names no size, so the pair is
left to the schema type rules instead of being reported as an unoffered size.

A PlacementConstraints that resolves to AWS::NoValue is removed before the task
is created, so the task does not pin placement; it is no longer reported.
@satyakigh satyakigh changed the title Misc bug fixes Fix condition, resource, and ECS Fargate validation Aug 5, 2026
…fault().

  - Prevented Fargate GB-to-MiB overflow panics with checked arithmetic.
  - Aligned CEL/Rego handling of placement constraints and conditional AWS::NoValue.
  - Report required Fargate properties removed by AWS::NoValue.
  - Allowed valid SAM Connectors and IgnoreGlobals.
  - Moved resource/condition shape validation after Fn::ForEach expansion.
@satyakigh satyakigh closed this Aug 6, 2026
@satyakigh satyakigh reopened this Aug 6, 2026
@satyakigh satyakigh closed this Aug 17, 2026
@satyakigh
satyakigh deleted the misc-bug-fixes branch August 18, 2026 16:58
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.

1 participant