Baptiste M
04/26/2021, 11:48 AM[2021-04-26 09:20:28,684] INFO - fargate-launch | Found 1 flow run(s) to submit for execution.
[2021-04-26 09:20:31,589] INFO - fargate-launch | Deploying flow run '6021f038-6c79-4e78-862a-e29143f7d205'
[2021-04-26 09:20:31,590] ERROR - fargate-launch | Logging platform error for flow run 6021f038-6c79-4e78-862a-e29143f7d205
[2021-04-26 09:20:34,079] ERROR - fargate-launch | Error while deploying flow
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/agent/agent.py", line 414, in deploy_and_update_flow_run
deployment_info = self.deploy_flow(flow_run)
File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/agent/ecs/agent.py", line 296, in deploy_flow
taskdef = self.generate_task_definition(flow_run, run_config)
File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/agent/ecs/agent.py", line 370, in generate_task_definition
taskdef["family"] = f"prefect-{slug}"
TypeError: 'str' object does not support item assignment
Do you have any idea ? I didn't try to restart the agent, because I want to find the reason of this failure without resolving it just with a restart.
Thanks !Kevin Kho
Baptiste M
04/26/2021, 12:55 PMKevin Kho
Kevin Kho
Baptiste M
04/26/2021, 1:29 PMRUN_CONFIG = ECSRun(
task_definition="prefect-importrawdataflow",
...
)
I removed the "prefect-" and now it works... But I don't know why.
I use the same image to register the flow and to execute the flow. With a prefect 0.14.15 installedKevin Kho
Kevin Kho
Kevin Kho
Baptiste M
04/26/2021, 1:50 PMRUN_CONFIG = ECSRun(
labels=["s3-flow-storage"],
task_role_arn=TASK_ARN,
image="******.<http://dkr.ecr.eu-west-3.amazonaws.com/*****|dkr.ecr.eu-west-3.amazonaws.com/*****>",
run_task_kwargs=RUN_TASK_KWARGS,
task_definition="importrawdataflow",
execution_role_arn="arn:aws:iam::*****:role/ECSTasksAllowS3AndECR",
cpu="2 vcpu",
memory="4 GB"
)
Baptiste M
04/26/2021, 1:51 PMKevin Kho
task_definition={"containerDefinitions":[{"name": "importrawdataflow"}]}
Kevin Kho
Baptiste M
04/26/2021, 2:39 PMKevin Kho