amazon-ecs-deploy-task-definition: Job Failing with "Error: Unsupported deployment controller: ECS"
Description
Recent jobs (as of around 28 Sep 03:30 UTC) have started failing with the error:
Error: Unsupported deployment controller: ECS
The specific job in the workflow that’s failing is:
- name: Deploy Amazon ECS backend service task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true
wait-for-minutes: 8
Previous jobs in the workflow (incl. Checkout, ECR Login, Building & pushing image to ECR, Filling in Task definition) are all passing.
Any idea what the problem could be?
Additional Notes:
- Deployment directly from the Amazon ECS Web UI is working
- There have been no changes to workflows since ~25th Sep, and there were successful deployments then.
- Attached is a redacted version of the task definition
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 24 (3 by maintainers)
Commits related to this issue
- Fix failure to deploy due to https://github.com/aws-actions/amazon-ecs-deploy-task-definition/issues/384 — committed to LCVista/devops-deploy-ecs-service by joe-lcv 2 years ago
I agree upgrading from fixed it.
Ok! The version with the patch has been released https://github.com/aws-actions/amazon-ecs-deploy-task-definition/releases/tag/v1.4.10. Please test it out and lmk if you’re still having any issues! Thank you all for reporting and thanks @astrike30 and @bradens for the deep dive and patch! ❤️
I have pretty much the same config as you.
If you run the action with debug on, you get the following when the action fails:
The error occurs at
index.js
at line 487. The first branch of the if statement should execute, but!serviceResponse.deploymentController
is returning false. Here I must admit that I have not taken the time to understand the code and the relevant AWS API completely, so I don’t fully know what the exact change should be. However, if you clone the repo, place it in your project, run the action from the repo, comment out the whole if block in/dist/index.js:566:15
and just run the line in the first if branch like so:the deployment works. I suspect
if (!serviceResponse.deploymentController)
should be changed toif (serviceResponse.deploymentController.type == 'ECS')
, but again I am not 100% what the consequences are here.For some reason
!serviceResponse.deploymentController
is returning false when it should return True, I suspect the AWS API has changed??I am using this changed code in my repo to deploy just until a fix is pushed.
Hey everyone - I’m working on releasing a version with the patch right now, I’ll post here once it’s released. So sorry for the delay!🥺
Still having this issue as well.
Quick workaround for those that are in a hurry
I temporarily modified my workflow, likning to the forked version of @bradens (thanks for that)
and it was a success.
So @ArneRiemann4711 , instead of
add this
and don’t forget to rollback once this issue has been resolved!
Same here (-: Any Workaround available, without changing deployment process?
We are also seeing this problem with workflows that have not changed.
Same issue, happens randomly. But if there are multiple services updated in single workflow, one of them fails for sure.
Hey @telosbrands! It looks like you’re using an older version of the action (de0132cf8cdedb79975c6d42b77eb7ea193cf28e). If you update to the commit 3cc43061dd30ad47511af35bca46e2c1435b9035 it should work.
Swapped mine and I’m getting this same error @10xSebastian reported.
@vlahanas @ArneRiemann4711 you can deploy directly from Amazon web console as the issue is only in running deployment but the images are getting pushed.