Skip to content

fix(ecs): validate --container-image names against task definition#260

Open
amaechiabuah wants to merge 4 commits intomainfrom
fix/ecs-update-image-validate-container
Open

fix(ecs): validate --container-image names against task definition#260
amaechiabuah wants to merge 4 commits intomainfrom
fix/ecs-update-image-validate-container

Conversation

@amaechiabuah
Copy link
Copy Markdown
Collaborator

@amaechiabuah amaechiabuah commented Apr 22, 2026

Describe Changes

Fixes DUPLO-32970. duploctl ecs update_image --container-image <name> <image> silently registered a new (identical) task-definition revision and triggered a service rollout when <name> didn't match any container on the existing task def.

update_image now diffs the supplied container names against the task def before mutating anything and raises DuploError(..., 404) naming the unknown container(s) and listing the valid ones — no revision registered, no rollout.

Verified live against ecs-hc-repro on a test tenant: bad name raises cleanly with the list of valid containers; valid names still succeed.

Link to Issues

https://app.clickup.com/t/8655600/DUPLO-32970

PR Review Checklist

  • Thoroughly reviewed on local machine.
  • Have you added any tests
  • Make sure to note changes in Changelog

@zafarabbas
Copy link
Copy Markdown
Contributor

@duploctl
Copy link
Copy Markdown
Contributor

duploctl Bot commented Apr 22, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3761 1437 38% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/duplo_resource/ecs_service.py 67% 🟢
TOTAL 67% 🟢

updated for commit: 9b61ff8 by action🐍

Copy link
Copy Markdown
Contributor

@duplodavid duplodavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want too add a unit test for the new error case, but otherwise LGTM!

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.

3 participants