Skip to content

fix(ecs): preserve container identity in task replacement plans - #214

Merged
discount-elf merged 1 commit into
mainfrom
fix/ecs-container-identity
Nov 24, 2026
Merged

discount-elf merged 1 commit into
mainfrom
fix/ecs-container-identity

Conversation

@discount-elf

Copy link
Copy Markdown
Contributor

Brings the 0.1.19 ECS fix onto main. It was released from release/0.1.19 (b0c572d) but never merged back, so 0.1.20 shipped without it and 0.1.21 would too.

Problem

AWS::ECS::TaskDefinition.containerDefinitions is an EntitySet keyed by indexField = "name", but containers are serialized with a Name key and formae looks the key up with an exact match. No container has an identity, so updating one container image in a task with sidecars produces unrelated container property changes.

Change

  • schema/pkl/ecs/taskdefinition.pkl: indexField = "Name", matching the serialized casing every other indexField in the schema already uses.
  • schema_ecs_entity_set_test.go: unit test for the emitted hint and for container identity across an image change and a reorder. It fails on main with identity "name" missing from serialized container and passes here.
  • testdata/ecs-container-identity*.pkl: conformance fixtures for the task replacement lifecycle.

Left out from b0c572d: the CHANGELOG.md entry (backfilled in #213), the formae-plugin.pkl version bump, and the debug-conformance workflow option.

Testing

go test -tags unit -run TestSchema . passes locally. The conformance fixtures were not run.

Use the serialized Name field to match ECS task-definition containers, so changes to the app container do not collapse into the sidecar. Cover the schema contract and task replacement lifecycle.

This shipped in 0.1.19 from release/0.1.19 (b0c572d) but was never merged to main, so 0.1.20 dropped it. The changelog, version bump and debug-conformance workflow changes from that commit are left out.
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.

2 participants