Hi all, I'm playing around with the prefect python client - wondering if there is a straightforward way to accomplish the following: Given a root node within the DAG of a flow run (say a task run), determine if all child subtasks were successful. In the old graphql API, I was able to do this using the notions of "downstream_edges" and "downstream_tasks", but I'm not finding the equivalent in the new API. Any pointers would be greatly appreciated, thanks!
Thanks, the state documentation was handy, but now I need to figure out how to parse the DAG of a flow run - that's the missing piece.
chris arettines
11/25/2024, 9:54 PM
I think I found out how to solve it - there is a "task_inputs" dict associated with the TaskRun object, which has fields containing the run ids of the tasks that it depends on (presumably). From the task run ids, I can derive the DAG and solve my problem.
🙌 1
t
Theom
02/18/2025, 8:24 AM
If I'm not mistaken you could also use the /api/flow_runs/{flow_run_id}/graph-v2 route and get all DAG info, including relationship between tasks and status.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.