Closed gdesmarais-ctx closed 2 years ago
We're having the same issue on two different apps too.
I'm looking into It already, I can reproduce it now.
We're facing the same problem here.
At least, if you don't want to set those cli options, you can run your deploy using the last version before update:
ecs-deploy==1.12.1
Don't forget to do that for every environment that you have for the project like: staging and production.
Same thing for the addition of the runtimePlatform
option, btw.
Added in this commit I believe: https://github.com/fabfuel/ecs-deploy/commit/b285a1facfd62b727538921410285a33fc994869
Thank you for the quick fix @fabfuel :love_you_gesture:
I have pushed a hotfix to PyPI: 1.13.1
It solves the problem, when an old task definition has no cpu
, memory
or runtimePlatform
defined.
Thanks for the detailed error report @gdesmarais-ctx! And thanks for the additional hint @henriquesalvaro
Hope, that everything is back to normal now?! 😅
It looks like the addition of the two cli options
task-cpu
andtask-memory
in https://github.com/fabfuel/ecs-deploy/blob/84c1b5d527ddced1a1189b1cf0b960dd6cc87585/ecs_deploy/cli.py (commit https://github.com/fabfuel/ecs-deploy/commit/84c1b5d527ddced1a1189b1cf0b960dd6cc87585) might be setting up for failure if you don't specify those values.When running (env vars are same as previous versions)
With
ecs-deploy==1.13.0
results in the following errors:Full stack trace at bottom of this.
I believe the issue is that the cli options will default to none https://github.com/fabfuel/ecs-deploy/blob/84c1b5d527ddced1a1189b1cf0b960dd6cc87585/ecs_deploy/cli.py#L183-184
and then the cli sets the values in the new task definition like: https://github.com/fabfuel/ecs-deploy/blob/84c1b5d527ddced1a1189b1cf0b960dd6cc87585/ecs_deploy/cli.py#L243-244
If you don't pass the parameters, the values are None, which seems to then cause the task definition to be invalid. I expect the right solution is to wrap the two
set_task_*
lines in something likeFull stack trace: