Garret Cook

07/19/2021, 3:13 AM
When I generate a child flow from inside a running flow using create_flow_run, the child runs and is marked successful in the web interface. However, the following error is logged in the parent flow, and the create_flow_run task is marked as failed.
Task 'create_flow_run': Exception encountered during task execution!
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/prefect/engine/", line 865, in get_task_run_state
File "/usr/local/lib/python3.6/site-packages/prefect/utilities/", line 327, in run_task_with_timeout
return*args, **kwargs)  # type: ignore
File "/usr/local/lib/python3.6/site-packages/prefect/tasks/prefect/", line 142, in create_flow_run
run_url = client.get_cloud_url("flow-run", flow_run_id)
File "/usr/local/lib/python3.6/site-packages/prefect/client/", line 1217, in get_cloud_url
as_user=(as_user and using_cloud_api and self._api_token is not None)
File "/usr/local/lib/python3.6/site-packages/prefect/client/", line 1252, in get_default_tenant_slug
res = self.graphql(query)
File "/usr/local/lib/python3.6/site-packages/prefect/client/", line 563, in graphql
raise ClientError(result["errors"])
prefect.exceptions.ClientError: [{'path': ['user'], 'message': 'field "user" not found in type: \'query_root\'', 'extensions': {'path': '$.selectionSet.user', 'code': 'validation-failed', 'exception': {'message': 'field "user" not found in type: \'query_root\''}}}]
Changing from secret to key on the agents seemed to fix this
👍 2