Skip to content

Add all arguments to register-task-definition command

Etienne Baqué requested to merge 218798-pass-all-args-ecs into master

Add all arguments to register-task-definition command

Closes gitlab#218798 (closed)

Manual testing

On AWS ECS, for the task definition which I've been using for testing, I entered a value for the cpu field that was previously nullified when creating a new revision of the task definition (ie. the bug we're trying to fix here). I set it to "256" then I made a copy of the generated task definition (version 67: task-definition-67.json).

Then, using an aws-ecs image based on this MR, I deployed a sample project (deployment job log here)

I checked the generated task definition (version 68: task-definition-68.json), and made a diff between both revision:

> diff task-definition-67.json task-definition-68.json
73c73
<       "image": "registry.gitlab.com/ebaque/rails-docker-ecs/docker-ecs:f8e7f91bad60cb496d14152b5d1941ae83de6d2f",
---
>       "image": "registry.gitlab.com/ebaque/rails-docker-ecs/docker-ecs:c86bad5105fd76dd2d29d922735b69b90e0d95a1",
101c101
<   "taskDefinitionArn": "arn:aws:ecs:us-east-1:392034512401:task-definition/hello-task-definition:67",
---
>   "taskDefinitionArn": "arn:aws:ecs:us-east-1:392034512401:task-definition/hello-task-definition:68",
133c133
<   "revision": 67,
---
>   "revision": 68,

cpu still has "256" as a value, as it was copied over to the new revision successfully.


More manual testing after @hfyngvason's review. I updated the a task definition with some more values that was not kept when creating a new task definition via the API: Network Mode and Requires Compatibilities. After manually creating a new revision with these values (revision 10), I reran a deploy job which created another new revision (revision 11).

Diffs between both task definition:

85c85
<   "taskDefinitionArn": "arn:aws:ecs:us-east-1:392034512401:task-definition/hello-review-task-definition:10",
---
>   "taskDefinitionArn": "arn:aws:ecs:us-east-1:392034512401:task-definition/hello-review-task-definition:11",
107c107
<   "revision": 10,
---
>   "revision": 11,
Edited by Etienne Baqué

Merge request reports