https://prefect.io logo
Title
s

Satsuki Nagae

04/05/2023, 8:35 AM
Hello. I am using Prefect 2.8.6. I am running ECS task within a flow using the ECS Task block. Even if an application error occurs within the ECS task, the error is not recognized by the flow, and the flow terminates as a success. Is there any way to detect errors in ECS tasks executed in the flow other than by determining them from the
status_code
of the
ECSTaskResult
?
from prefect_aws.ecs import ECSTask
ecs_task_block = ECSTask.load("my-ecs-task-block")
ecs_task_result = ecs_task_block.run()
print(ecs_task_result.exit_code) # 1 (application error)
s

Samuel Hinton

04/05/2023, 8:37 AM
We had the same query and ended up simply using the status code. You can stream logs back so its easier to see what went wrong, but the logs go to stdout so you cant analyse the stacks with code
s

Satsuki Nagae

04/06/2023, 1:30 AM
the logs go to stdout so you cant analyse the stacks with code
Hmm, it seems difficult to solve my problem. I hope for a future feature that can detect errors. Thank you for your kind response.