Repository navigation
fix(ecs): preserve container identity in task replacement plans - #214
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the 0.1.19 ECS fix onto
main. It was released fromrelease/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.containerDefinitionsis anEntitySetkeyed byindexField = "name", but containers are serialized with aNamekey 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 otherindexFieldin 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 onmainwithidentity "name" missing from serialized containerand passes here.testdata/ecs-container-identity*.pkl: conformance fixtures for the task replacement lifecycle.Left out from
b0c572d: theCHANGELOG.mdentry (backfilled in #213), theformae-plugin.pklversion bump, and the debug-conformance workflow option.Testing
go test -tags unit -run TestSchema .passes locally. The conformance fixtures were not run.