Keith Veleba
07/07/2022, 4:29 PMUnexpected error: AttributeError("'S3Result' object has no attribute 'upload_options'")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 930, in get_task_run_state
result = self.result.write(value, **formatting_kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/engine/results/s3_result.py", line 89, in write
ExtraArgs=self.upload_options,
AttributeError: 'S3Result' object has no attribute 'upload_options'
Attached is one of the flows that are failing. Does the task running code record execution state back to the storage bucket?
Thanks in advance!Kevin Kho
07/07/2022, 4:42 PMKeith Veleba
07/07/2022, 4:57 PM{
"cpu": null,
"env": null,
"type": "ECSRun",
"image": "prefecthq/prefect:latest-python3.8",
"labels": [],
"memory": null,
"__version__": "1.2.0",
"task_role_arn": null,
"run_task_kwargs": null,
"task_definition": null,
"execution_role_arn": null,
"task_definition_arn": null,
"task_definition_path": null
}
Kevin Kho
07/07/2022, 4:59 PMKeith Veleba
07/07/2022, 5:00 PMECSRUN_IMAGE="prefecthq/prefect:1.2.0-python3.8"
if __name__ == "__main__":
flow.run_config = ECSRun(image=ECSRUN_IMAGE)
flow.register(project_name=PROJECT_NAME, labels=[ENVIRONMENT])
ran on registerKevin Kho
07/07/2022, 5:23 PMKeith Veleba
07/07/2022, 5:46 PM[
{
"name": "${var.environment}-prefect-ecs-agent",
"image": "${var.docker_image}",
"essential": true,
"command": [
"prefect",
"agent",
"ecs",
"start",
"--cluster",
"${var.ecs_cluster_arn}",
"--run-task-kwargs",
"<s3://sgmt>-${var.environment}-prefect-flows/run_config_private.yaml",
"--task-role-arn",
"${aws_iam_role.prefect-task-role.arn}"
],
"environment": [
{
"name": "PREFECT__CLOUD__AGENT__LABELS",
"value": "[${join(",", [for l in var.agent_labels : format("'%s'",l)])}]"
},
{
"name": "PREFECT__CLOUD__AGENT__LEVEL",
"value": "DEBUG"
},
{
"name": "PREFECT__CLOUD__API",
"value": "<https://api.prefect.io>"
},
{
"name": "OTHER_PREFECT__CONTEXT__SECRETS__AWS_CREDENTIALS",
"value": "{\"ACCESS_KEY\":\"${var.access_key}\",\"SECRET_ACCESS_KEY\":\"${var.secret_access_key}\"}"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "${aws_cloudwatch_log_group.log-group.name}",
"awslogs-region": "${var.region}",
"awslogs-stream-prefix": "ecs",
"awslogs-create-group": "true"
}
},
"secrets": [
{
"name": "PREFECT__CLOUD__API_KEY",
"valueFrom": "${var.api_key}"
}
]
}
prefect_docker_image="prefecthq/prefect:1.2.0-python3.8"
Kevin Kho
07/07/2022, 6:35 PMpython myfile.py
?Keith Veleba
07/07/2022, 6:49 PMKevin Kho
07/07/2022, 6:54 PMKeith Veleba
07/07/2022, 7:06 PMKevin Kho
07/07/2022, 7:10 PM