Hi – I have a basic flow of flows, with two flows ...
# ask-community
v
Hi – I have a basic flow of flows, with two flows within running sequentially. Tested in Core environment, everything finished as expected. Running the same in Cloud immediately gives the error below. Interestingly, first flow actually runs and finishes successfully (visible in Runs screen of that flow). However, both flows are marked as failed in the group flow. Feels like a bug, but I could be overlooking something. Any help will be greatly appreciated! Flow of flows created as following (based on https://docs.prefect.io/core/idioms/flow-to-flow.html tutorial): flow1_trig = StartFlowRun(flow_name='flow1', project_name='prj', wait=True) flow2_trig = StartFlowRun(flow_name='flow2', project_name="prj", wait=True) with Flow("group") as flow_grp:    flow2_trig.set_upstream(flow1_trig) Error: Unexpected error: 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\''}}}]) Traceback (most recent call last): File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner new_state = method(self, state, *args, **kwargs) File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 856, in get_task_run_state value = prefect.utilities.executors.run_task_with_timeout( File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/utilities/executors.py", line 298, in run_task_with_timeout return task.run(*args, **kwargs) # type: ignore File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/utilities/tasks.py", line 449, in method return run_method(self, *args, **kwargs) File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/tasks/prefect/flow_run.py", line 172, in run run_link = client.get_cloud_url("flow-run", flow_run_id) File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/client/client.py", line 887, in get_cloud_url tenant_slug = self.get_default_tenant_slug(as_user=as_user and using_cloud_api) File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/client/client.py", line 920, in get_default_tenant_slug res = self.graphql(query) File "/home/bitnami/anaconda3/lib/python3.8/site-packages/prefect/client/client.py", line 318, in graphql raise ClientError(result["errors"]) prefect.utilities.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\''}}}]
h
The error message seems to be from Hasura and you probably aren't using a JWT or x-hasura-role that matches the permissions required to read the "user" relation. If you say that it works the first time, you might have gotten your JWT timed out.
j
This is running against cloud? What version of prefect are you using? There was a bug in Prefect several versions ago that would result in something like this, but that has since been resolved.
1
Also, in the future can you post long code blocks inside a thread (instead of in your top-level comment)? This makes it easier to see ongoing conversations in the main slack channel. If you wrap a code block in triple backticks
Copy code
```
like this
```
it will format properly too, and be much easier to read.
v
It was indeed version issue. Upgraded from 0.13.18 to prefect-0.14.11 and everything works now as expected. Thanks a lot!
👍 1