Vitaly Shulgin
01/27/2021, 3:14 PMStartFlowRun
, when I run it locally, everything is working fine, but, when it executed in k8s container, which is running by schedule it failsTraceback (most recent call last):
File "/root/.prefect/runner/flows/lazarus/load_jobs.py", line 97, in run
self.__schedule(
File "/root/.prefect/runner/flows/lazarus/load_jobs.py", line 77, in __schedule
flow_run.run(idempotency_key=custom_name)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/tasks.py", line 449, in method
return run_method(self, *args, **kwargs)
File "/usr/local/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 "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 895, in get_cloud_url
tenant_slug = self.get_default_tenant_slug(as_user=as_user and using_cloud_api)
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 928, in get_default_tenant_slug
res = self.graphql(query)
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 297, in graphql
result = <http://self.post|self.post>(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 212, in post
response = self._request(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 444, in _request
response = self._send_request(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 373, in _send_request
raise ClientError(f"{exc}\n{graphql_msg}") from exc
prefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: <http://prefect-apollo:4200/graphql>
The following error messages were provided by the GraphQL server:
GRAPHQL_VALIDATION_FAILED: Cannot query field "user" on type "Query".
The GraphQL query was:
query {
user {
default_membership {
tenant {
slug
}
}
}
}
The passed variables were:
null
as_user=False
flow_run = StartFlowRun(
flow_name = flow_name,
project_name = project_name,
parameters = {
"play_id": play_id,
"play_name": custom_name
},
run_name = custom_name,
scheduled_start_time = start_time
)
flow_run.run(idempotency_key=custom_name)
josh
01/27/2021, 3:16 PMas_user=False
is passed in by default as of a month ago it looks like from the commit historyVitaly Shulgin
01/27/2021, 3:17 PMjosh
01/27/2021, 3:18 PM0.14.0
Vitaly Shulgin
01/27/2021, 3:18 PM