Skip to content

fix(ecs): apply the full mutable field set in UpdateService#1799

Merged
vieiralucas merged 2 commits into
mainfrom
fix/ecs-updateservice-fields
Jun 20, 2026
Merged

fix(ecs): apply the full mutable field set in UpdateService#1799
vieiralucas merged 2 commits into
mainfrom
fix/ecs-updateservice-fields

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

UpdateService read only desiredCount, taskDefinition, and the deployment lifecycleHooks, silently dropping every other mutable field. So ECS Exec enablement, subnet/security-group changes (networkConfiguration), deployment tuning (min/max healthy percent + circuit breaker), load-balancer swaps, placement, platformVersion, capacity-provider strategy, propagateTags, and managed-tags all no-op'dDescribeServices kept echoing the create-time values.

Fix: apply each field when present in the request (AWS partial-update semantics — an omitted field is left unchanged). All target fields already exist on the Service struct and are rendered by DescribeServices, so this is purely wiring the reads.

Found by the 2026-06-20 bug-hunt audit (finding 1.15).

Test plan

  • update_service_applies_extended_fields — updates enableExecuteCommand / enableECSManagedTags / healthCheckGracePeriodSeconds / platformVersion / propagateTags / networkConfiguration / deploymentConfiguration (min/max + circuit breaker) and asserts each is stored.
  • Full ECS suite: 107 passed.
  • cargo clippy -p fakecloud-ecs --all-targets -- -D warnings clean.

Summary by cubic

Apply all mutable ECS service fields in UpdateService with AWS partial-update semantics. Fixes no-op updates so DescribeServices reflects changes beyond desiredCount, taskDefinition, and lifecycle hooks.

  • Bug Fixes
    • Apply when present: deploymentConfiguration (min/max + circuit breaker), networkConfiguration, platformVersion, healthCheckGracePeriodSeconds, enableExecuteCommand, enableECSManagedTags, propagateTags, capacityProviderStrategy, placementConstraints, placementStrategy, loadBalancers, serviceRegistries.
    • Added test update_service_applies_extended_fields; full ECS suite passes.

Written for commit dd4342f. Summary will update on new commits.

Review in cubic

UpdateService read only desiredCount, taskDefinition, and the deployment
lifecycleHooks, silently dropping every other mutable field. So ECS Exec
enablement, subnet/security-group changes (networkConfiguration),
deployment tuning (min/max healthy percent + circuit breaker),
load-balancer swaps, placement, platform version, capacity-provider
strategy, propagate-tags, and managed-tags all no-op'd -- DescribeServices
kept echoing the create-time values.

Apply each field when present in the request (AWS partial-update
semantics: an omitted field is left unchanged). All target fields already
exist on the Service struct and are rendered by DescribeServices.

- crates/fakecloud-ecs/src/service_services_resource.rs
- test: update_service_applies_extended_fields
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.31373% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...tes/fakecloud-ecs/src/service_services_resource.rs 84.31% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@vieiralucas vieiralucas merged commit 5c3a851 into main Jun 20, 2026
55 checks passed
@vieiralucas vieiralucas deleted the fix/ecs-updateservice-fields branch June 20, 2026 17:34
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