Steve s
05/14/2022, 2:48 PMcreate_flow_run
(and wait_for_flow_run
) tasks. One of these steps is followed up with a get_task_run_result
, which has always worked without issue until today. Now it's throwing this error: ValueError: The task result cannot be loaded if it is not finished
. I'm not seeing how this could be, since I can see in the logs that the upstream task did in fact finish successfully. I tried explicitly setting the result of wait_for_flow_run
as an upstream dependency of get_task_run_result
(which i think shouldn't be needed), and I also tried setting the poll_time
to 30
, but still no luck. Does anyone have any ideas?Anna Geller
Steve s
05/14/2022, 3:49 PMflow_etl_trips_id = create_flow_run(flow_name="ETL Trips")
check_flow_etl_trips_id = check_run_terminal_state(
wait_for_flow_run(flow_etl_trips_id)
)
latest_file_data = get_task_run_result(flow_etl_trips_id, "latest_file-1", poll_time=30)
latest_file_data.set_upstream(check_flow_etl_trips_id)
set_upstream
and had no issues with it until today. but adding it in hasn't fixed my problem unfortunatelyAnna Geller
from prefect import Flow
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run
PROJECT_NAME = "community"
with Flow("sample_flow") as flow:
child_run_id = create_flow_run(
flow_name="child_flow",
project_name=PROJECT_NAME,
task_args={"name": "Friendly name for a DAG node"},
)
extract_load_wait_task = wait_for_flow_run(
child_run_id,
raise_final_state=True,
stream_logs=True,
task_args={"name": "Friendly wait task name"},
)
Steve s
05/14/2022, 3:56 PM@task
def check_run_terminal_state(view):
if isinstance(
view.state,
Success
):
raise signals.SUCCESS()
else:
raise signals.FAIL()
Anna Geller
Steve s
05/14/2022, 3:57 PMgot an unexpected keyword argument 'raise_final_state'
. i pulled up the method def for wait_for_flow_run
on my local machine and confirmed that kwarg isn't specified thereraise_final_state
approach again?Anna Geller
Steve s
05/15/2022, 2:35 PMraise_final_state
instead), but this didn't change the error behavior - still occurs intermittently
at this point i'm just going to re-factor some things and stop using get_task_run_result
, but i'm starting to think this might be a bug in Prefect. i'm not sure how to further diagnose though 😞Kevin Kho
Steve s
05/23/2022, 3:36 PMKevin Kho
Steve s
05/23/2022, 3:43 PMKevin Kho
Steve s
05/23/2022, 3:46 PM