Hello everyone. I have two flows and one flow name...
# prefect-ui
s
Hello everyone. I have two flows and one flow named
Flow A
invokes the another flow named
Flow B
. If the
Flow B
fails then it informs
Flow A
that it has failed and
Flow A
. I am not able to figure out how can I navigate to
Flow B
run from the
Flow A
? We get alerts from
Flow A
and the url from the alerts lands us to the run of
Flow A
. To navigate into the
Flow B
run I have to go navigate manually from the list of flows. Is there any easy way?
k
Hi @Sumit Kumar Rai, the logs should contain the information on FlowB, especially if you go to Task level logs I think. Though this is not a first-class experience and is one of the reasons subflows was redesigned for Orion. This is a more seamless experience in Prefect 2.0
upvote 1
s
Thanks @Kevin Kho. You are always helpful.
a
@Sumit Kumar Rai You can also add the argument
stream_logs=True
allowing you to see child flow run logs directly in the parent flow, example:
Copy code
from prefect import Flow
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run

with Flow("parent_flow") as flow:
    child_flow_run_id = create_flow_run(
        flow_name="child_flow_name", run_name="custom_run_name"
    )
    child_flowrunview = wait_for_flow_run(
        child_flow_run_id, raise_final_state=True, stream_logs=True
    )