Skip to content

fix(ecs): model the circuit breaker threshold and reset fields - #216

Merged
discount-elf merged 1 commit into
mainfrom
fix/ecs-circuit-breaker-threshold
Dec 3, 2026
Merged

discount-elf merged 1 commit into
mainfrom
fix/ecs-circuit-breaker-threshold

Conversation

@discount-elf

@discount-elf discount-elf commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

AWS added two fields to AWS::ECS::Service DeploymentConfiguration.DeploymentCircuitBreaker and returns them on read:

  • ResetOnHealthyTask (boolean, defaults to true)
  • ThresholdConfiguration (Type of COUNT, BOUNDED_PERCENT or UNBOUNDED_PERCENT, plus an integer Value; defaults to BOUNDED_PERCENT / 50)

The schema only declared enable and rollback, so rendering a service back to Pkl fails on 0.1.21:

Cannot render resource "ops-service" in stack "formae-ops" of type "AWS::ECS::Service":
deploymentConfiguration["deploymentCircuitBreaker"]: Unsupported desired declaration fields:
Set("ResetOnHealthyTask", "ThresholdConfiguration")

Change

  • Add resetOnHealthyTask and thresholdConfiguration to DeploymentCircuitBreaker, with a new ThresholdConfiguration sub-resource. Shapes are taken from the current CloudFormation registry schema for AWS::ECS::Service.
  • Mark both as provider defaults and record them in schema/provider-default-dispositions.json, following the hostedZoneTier change in fix(route53): model HostedZoneConfig.hostedZoneTier #208.

Testing

  • make verify-schema passes
  • go test -tags=unit ./... passes
  • Not run: conformance tests, and no end-to-end extract against a live service with the patched schema

AWS added ResetOnHealthyTask and ThresholdConfiguration (Type of COUNT,
BOUNDED_PERCENT or UNBOUNDED_PERCENT, and an integer Value) to
AWS::ECS::Service DeploymentConfiguration.DeploymentCircuitBreaker and
returns them on read. The schema did not know the fields, so rendering a
service back to Pkl failed with

  deploymentConfiguration["deploymentCircuitBreaker"]: Unsupported
  desired declaration fields: Set("ResetOnHealthyTask",
  "ThresholdConfiguration")

Both fields are now modelled as provider defaults and recorded in the
dispositions manifest. AWS defaults them to true and BOUNDED_PERCENT 50.
@discount-elf
discount-elf merged commit 83006e7 into main Dec 3, 2026
9 checks passed
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