https://prefect.io logo
Title
e

Ethienne Marcelin

02/06/2023, 10:16 PM
Hey 😄 Quick question What are the
parent_task_id
keys of the
FlowRun
object pointing to ? It doesn't seem to point to a FlowRun uuid or a Flow uuid 🤔 ?
z

Zanie

02/06/2023, 10:34 PM
It points to the a task run in the parent flow run that’s used to track the child flow run
i.e. Parent flow run -> Child task run -> Child flow run
The child task run and child flow run always have matching states attached
It’s an implementation detail of how we manage subflows
e

Ethienne Marcelin

02/07/2023, 9:17 AM
Ok thanks ! Is there a way to easily link a subflow run with its parent run then ?
okay here's the solution i found
async with get_client() as client:
    task_run = client.read_task_run(parent_task_id)
parent_flow_run_id = task_run.flow_run_id