Repository navigation
fix(aws): ecs update/wait tolerate Floci's missing deployments field (#937) - #941
Merged
Merged
Conversation
#937) `realEcs.updateService`/`describeService` crashed against Floci — `described.service.deployments[0]` and `svc?.deployments.length` throw `Cannot read properties of undefined` because Floci's ECS responses omit the `deployments` field entirely (real AWS always includes it), and the optional chaining only guarded the first hop, not the chained index/`.length`. Extract the two fragile reads into pure `ecsDeploymentId` / `ecsServiceStable` helpers that guard the whole chain (`deployments?.[0]?.id`, `deployments?.length ?? 0`), and unit-test both the real-AWS and Floci shapes. Unblocks ecs-update-service / wait-steady-state for any project validating via Floci.
This was referenced Jul 15, 2026
lex00
added a commit
that referenced
this pull request
Jul 15, 2026
#937/#938 landed independently as #941/#942 while this was in flight; this is the reconciled remainder on top of them + #943. - #935 aws: Outputs section walks nested AttrRef (Join/Sub) to Fn::GetAtt (line 349 LexiconOutput path — distinct from #943's stackOutput path) instead of leaking the __attrRef envelope (+ regression test) - #936 core: docker-build joins dockerfile onto context (its documented contract), not -f relative to cwd - #939 core: health-gate composes a URL from an optional host (a cross-stack Wiring value) + path Full suite green (7932 tests); validated end-to-end by loomster's 7/7 Floci deploy.
Closed
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.
Closes #937.
Problem
realEcs.updateService/describeService(lexicons/aws/src/components/cloud-executor.ts) crash against Floci:Floci's ECS responses omit the
deploymentsfield entirely (real AWS always includes it), and the optional chaining only guarded the first hop, not the chained index /.length. Soecs-update-serviceandwait-steady-statefail unconditionally against Floci for any project using them — blocking local/CI validation.Fix
Extract the two fragile reads into pure, guarded helpers and use them in
realEcs:ecsDeploymentId(described)→described.service.deployments?.[0]?.id ?? ""ecsServiceStable(svc)→(svc?.deployments?.length ?? 0) <= 1Parsed types now mark
deploymentsoptional (honest about Floci). Unit tests cover both the real-AWS shape and the Floci (no-deployments) shape for each. aws build + tests green.