Eddie
10/07/2021, 6:17 PMprefect run -m flows.dev.parent_child -n parent
and got the following exception:
└── 14:10:26 | ERROR | Task 'create_flow_run': Exception encountered during task execution!
Traceback (most recent call last):
File "/Users/epantridge/Library/Caches/pypoetry/virtualenvs/flows-Lt6Mru_j-py3.9/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 859, in get_task_run_state
value = prefect.utilities.executors.run_task_with_timeout(
File "/Users/epantridge/Library/Caches/pypoetry/virtualenvs/flows-Lt6Mru_j-py3.9/lib/python3.9/site-packages/prefect/utilities/executors.py", line 454, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "/Users/epantridge/Library/Caches/pypoetry/virtualenvs/flows-Lt6Mru_j-py3.9/lib/python3.9/site-packages/prefect/tasks/prefect/flow_run.py", line 118, in create_flow_run
flow = FlowView.from_flow_name(flow_name, project_name=project_name)
File "/Users/epantridge/Library/Caches/pypoetry/virtualenvs/flows-Lt6Mru_j-py3.9/lib/python3.9/site-packages/prefect/backend/flow.py", line 192, in from_flow_name
flows = cls._query_for_flows(
File "/Users/epantridge/Library/Caches/pypoetry/virtualenvs/flows-Lt6Mru_j-py3.9/lib/python3.9/site-packages/prefect/backend/flow.py", line 287, in _query_for_flows
raise ValueError(
ValueError: No results found while querying for flows where {'name': {'_eq': 'child'}, 'archived': {'_eq': False}}
Does this imply that the child flow has to be registered before the parent flow can be run? If so, is there a way to register a flow in-process when testing locally?Kevin Kho
10/07/2021, 6:20 PMStartFlowRun
or create_flow_run
. They are first class flows as well and actually create a flow run in the database.
Not quite a way to test because these are API calls to the database so they do need to be registered. I believe someone in the community channel monkeypatched those Tasks for local testing to find the flow and call flow.run()
but I don’t have details on that other than they said it workedEddie
10/07/2021, 6:25 PMKevin Kho
10/07/2021, 6:27 PMEddie
10/07/2021, 6:32 PM