Sumit Kumar Rai

    Sumit Kumar Rai

    7 months ago
    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?
    Kevin Kho

    Kevin Kho

    7 months ago
    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
    Sumit Kumar Rai

    Sumit Kumar Rai

    7 months ago
    Thanks @Kevin Kho. You are always helpful.
    Anna Geller

    Anna Geller

    7 months ago
    @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:
    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
        )