Jeff Baatz
07/08/2021, 6:17 PMStartFlowRun
and the parent flow is throwing ValueError: Failed to find current tenant None in result {'data': {'tenant'...
The subflows are triggering and running correctly, but it looks as though the parent flow can't view their status? Does the agent running the parent flow need to have a user API key or something attached to it in order to query flow status, but not to submit a flow for execution?Kevin Kho
StartFlowRun
task uses the create_flow_run
method of the Client
under the hood.Jeff Baatz
07/08/2021, 6:46 PMKevin Kho
Jeff Baatz
07/08/2021, 7:00 PMFile "/usr/local/lib/python3.6/dist-packages/prefect/client/client.py", line 1249, in get_default_tenant_slug
f"Failed to find current tenant {self.tenant_id!r} in result {res}"
ValueError: Failed to find current tenant None in result {'data': {'tenant': [{'id': '79a6cbe5-17f0-46b6-9958-3a7ebc21fa74', 'slug': ...}]}}
It looks like the tenant ID isn't being populated at all, which probably means the api token isn't being set. The agent definitely has an API key but I'm wondering if that API key isn't passed through to the docker image in which the parent flow is being executed.Jeff Baatz
07/08/2021, 7:05 PMprefect agent docker start --key "<YOUR-KEY>"
I just pass a service account key with the -t
options. When you say to use the API key, do you mean to add an argument for the --key
?Jeff Baatz
07/08/2021, 7:08 PMKevin Kho
Kevin Kho
Jeff Baatz
07/08/2021, 8:04 PMJeff Baatz
07/08/2021, 8:04 PM400 Client Error for <http+docker://localhost/v1.40/containers/create?name=uncovered-ibis>: Bad Request ("invalid IP address in add-host: "host-gateway"")
back from all runs.Jeff Baatz
07/08/2021, 8:42 PMDocker version 20.10.3, build 48d30b5
, python docker==5.0.0
(also tried 4.0.2) and prefect 0.15.0
. I noticed that it seems to happen whenever the flow is registered with 0.15.0 core regardless of what version of prefect the agents are running under.Kevin Kho
Kevin Kho
Jeff Baatz
07/08/2021, 9:00 PMUbuntu 18.04.5 LTS
Kamil Okáč
07/13/2021, 2:06 PMDocker version 20.10.4, build d3cb89e
) the error went away.