<@ULVA73B9P> In the flow run graph, sometimes task...
# ask-marvin
w
@Marvin In the flow run graph, sometimes task nodes are connected with lines and sometimes they are not, even though the tasks are dependent on each other. What is the difference?
m
thought for 159.6 seconds
Great question. In Prefect 3.x, the Flow Run Graph is a data lineage view, not a full dependency graph. - A line is drawn only when a downstream task uses the upstream task’s output (i.e., the upstream task’s result is passed as an input to the downstream task). - No line is drawn for “logical” dependencies that don’t pass data, such as: - Using
depends_on
-style ordering - Awaiting a task just to ensure it finishes, but not using its result - Concurrency/group limits or other orchestration constraints Subflows are a special case: the graph can show an “encapsulating” relationship from a parent task to the subflow run, but typical edges between tasks still require data flow. Quick example:
Copy code
from prefect import flow, task

@task
def A():
    return 1

@task
def B(x):
    return x + 1

@task
def C():
    return "done"

@flow
def my_flow():
    a = A()
    B(a)     # Line A → B (B uses A’s output)
    C()      # No line from A → C (no data passed)
Notes: - The graph only includes tasks that actually started (non-pending). If something hasn’t started, you may not see it or its edges yet. - If you want a relationship to appear as a line, pass the upstream result (or a value derived from it) into the downstream task.