Ivan
07/25/2023, 11:11 AMFlow run could not be submitted to infrastructure: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Too many concurrent attempts to create a new revision of the specified family.
When tried to re-launch the jobs, they've executed successfully.
How to solve this issue?
I know there are some issues with ECS Agent back in 2021:
https://github.com/PrefectHQ/prefect/issues/4402
And ongoing issue with terraform:
https://github.com/hashicorp/terraform-provider-aws/issues/9777
But I'm not sure how we can solve this on the ecstask push work-pool settings levelJake Kaplan
07/25/2023, 12:01 PMJake Kaplan
08/02/2023, 10:25 PMMitch
10/19/2023, 1:55 PMJake Kaplan
10/19/2023, 2:01 PMMitch
10/19/2023, 2:24 PMprefect
now. Even if I define the family, won't it still publish a new revision each time ?Jake Kaplan
10/19/2023, 2:25 PMJake Kaplan
10/19/2023, 2:26 PMMitch
10/19/2023, 2:31 PMRetrieving ECS task definition 'arn:aws:ecs:us-east-2:XXXXXXXXX:task-definition/prefect:518'...
Cached task definition 'arn:aws:ecs:us-east-2:XXXXXXXXX:task-definition/prefect:518' does not meet requirements
Registering ECS task definition...
Task definition request{
"cpu": "4096",
"memory": "8192",
"executionRoleArn": "arn:aws:iam::XXXXXXXXX:role/prefect_ecs_execution_role",
"containerDefinitions": [
{
"image": "<http://XXXXXXXXX.dkr.ecr.us-east-2.amazonaws.com/py310:1.0.1|XXXXXXXXX.dkr.ecr.us-east-2.amazonaws.com/py310:1.0.1>",
"name": "prefect",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "prefect",
"awslogs-region": "us-east-2",
"awslogs-stream-prefix": "Attribution Flow"
}
}
}
],
"family": "prefect",
"requiresCompatibilities": [
"FARGATE"
],
"networkMode": "awsvpc"
Jake Kaplan
10/19/2023, 2:39 PMMitch
10/19/2023, 2:42 PMMitch
10/19/2023, 3:01 PMmy flow abc
my flow def
my flow ghi
Jake Kaplan
10/19/2023, 3:06 PMMitch
10/19/2023, 3:08 PM@flow(flow_run_name = "Greek pnl Attribution Flow {strategy}",
log_prints=True,
retries = 3
)
Mitch
10/19/2023, 3:08 PMJake Kaplan
10/19/2023, 3:10 PMMitch
10/19/2023, 3:10 PMMitch
10/19/2023, 3:14 PMMitch
10/19/2023, 3:25 PMecs_work_pool: &ecs_work_pool_greekpnl
name: ecs-worker-pool
work_queue_name: default
job_variables:
containerDefinitions:
- logConfiguration:
logDriver: awslogs
options:
awslogs-group: prefect
awslogs-region: us-west-2
awslogs-create-group: true
awslogs-stream-prefix: My Flow
Jake Kaplan
10/19/2023, 3:42 PMjob_variables:
name: My Config
Jake Kaplan
10/19/2023, 3:43 PMif configuration.configure_cloudwatch_logs:
container["logConfiguration"] = {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "prefect",
"awslogs-region": region,
"awslogs-stream-prefix": configuration.name or "prefect",
**configuration.cloudwatch_logs_options,
},
}
Mitch
10/19/2023, 3:43 PMJake Kaplan
10/19/2023, 3:44 PMself.name = self.name or flow_run.name
Mitch
10/19/2023, 3:44 PMJake Kaplan
10/19/2023, 3:45 PMMitch
10/19/2023, 3:46 PMMitch
10/19/2023, 3:59 PMMitch
10/19/2023, 4:04 PM