Jacob Longhurst
01/24/2022, 6:20 PMregistering agent
. I took a look through the code and it seems that on spin up the agent attempts a query in the db to see if it already exists. If it doesn’t then it registers itself by adding a new record of itself to the db. We are also not currently using the prefect cloud server but rather local instances of apollo, graphql, hasura, etc running in our k8s cluster
Here is the stack trace
[2022-01-24 18:15:41,310] INFO - agent | Registering agent...
Traceback (most recent call last):
File "/usr/local/bin/prefect", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/prefect/cli/agent.py", line 331, in start
start_agent(KubernetesAgent, image_pull_secrets=image_pull_secrets, **kwargs)
File "/usr/local/lib/python3.6/site-packages/prefect/cli/agent.py", line 140, in start_agent
agent.start()
File "/usr/local/lib/python3.6/site-packages/prefect/agent/agent.py", line 189, in start
self._setup_api_connection()
File "/usr/local/lib/python3.6/site-packages/prefect/agent/agent.py", line 910, in _setup_api_connection
self.client.attach_headers({"X-PREFECT-AGENT-ID": self._register_agent()})
File "/usr/local/lib/python3.6/site-packages/prefect/agent/agent.py", line 858, in _register_agent
agent_config_id=self.agent_config_id,
File "/usr/local/lib/python3.6/site-packages/prefect/client/client.py", line 2107, in register_agent
agent_config_id=agent_config_id,
File "/usr/local/lib/python3.6/site-packages/prefect/client/client.py", line 570, in graphql
raise ClientError(result["errors"])
prefect.exceptions.ClientError: [{'message': '"\'Box\' object has no attribute \'data\'"', 'locations': [{'line': 2, 'column': 5}], 'path': ['register_agent'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': '"\'Box\' object has no attribute \'data\'"'}}}]
I can also provide the yaml for the k8sAnna Geller
01/25/2022, 9:51 AM- name: PREFECT__CLOUD__API
value: <http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>
Jacob Longhurst
01/25/2022, 6:14 PMAnna Geller
01/25/2022, 7:26 PM- name: PREFECT__CLOUD__API
value: <https://api.prefect.io>
Jacob Longhurst
01/25/2022, 7:50 PMAnna Geller
01/25/2022, 7:51 PMJacob Longhurst
01/25/2022, 7:54 PMAnna Geller
01/25/2022, 7:57 PMJacob Longhurst
01/25/2022, 7:58 PM