-
Couldn't load subscription status.
- Fork 14
Description
I'm trying to use your Github action in a project, as it makes executing ECS tasks very very simple. It works like a charm for short (a couple minutes) ECS tasks, but I'm running into issues when I use it to run ECS task that takes longer to execute (10+ minutes).
ECS task gets started correctly by the Github action, runs till completion (I can see ECS logs output from github action) and then changes its status to Stopped in AWS Console. The Github action execution however just hangs there in running state forever (well, I've waited 20 minutes for it to complete and then cancelled the workflow). For shorter tasks the action execution completes as soon as ECS task goes into Stopped status.
Any advice how to get the action to work with longer ECS tasks?
Task configuration
- name: Run command uses: geekcell/github-action-aws-ecs-run-task@v3.0.0 with: cluster: clusterXYZ task-definition: taskXYZ assign-public-ip: 'DISABLED' subnet-ids: subnet-123 security-group-ids: sg-123 tail-logs: true override-container: Container override-container-command: ${{ inputs.command }} override-container-environment: | NODE_ENV=dev Cluster/task definitions:
const image = ecs.EcrImage.fromEcrRepository(repository, 'latest'); const vpc = ec2.Vpc.fromLookup(this, 'VPC', { vpcId: 'vpc-123', }); new ecs.Cluster(this, 'Cluster', { clusterName: 'clusterXYZ', vpc, }); const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDefinition', { family: 'taskXYZ', memoryLimitMiB: 16384, cpu: 4096, taskRole: new Role(this, 'TaskRole', { ... } ); taskDefinition.addContainer('Container', { image: image, environment: { NODE_ENV: 'dev' }, logging: new ecs.AwsLogDriver({ streamPrefix: 'prefixXYZ', mode: ecs.AwsLogDriverMode.NON_BLOCKING, }), });