https://prefect.io logo
#prefect-community
Title
# prefect-community
l

Leon Kozlowski

05/05/2022, 9:32 PM
Hi - I just happened to inspect my agent pod logs on k8s - I’m seeing a ton of errors with the following traceback:
Copy code
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/prefect/agent/kubernetes/agent.py", line 413, in heartbeat
    self.manage_jobs()
  File "/usr/local/lib/python3.8/site-packages/prefect/agent/kubernetes/agent.py", line 193, in manage_jobs
    f"Job {job.name!r} is for flow run {flow_run_id!r} "
AttributeError: 'V1Job' object has no attribute 'name'
I found a thread discussing this - but I wanted to know if there was another way to alleviate this other than upgrading to prefect 1.0+ - If that is the only solution, are there any gotchas/things I should look out for when upgrading? And will flows as old as 0.14.X still run as expected?
k

Kevin Kho

05/05/2022, 9:33 PM
The main deprecation were the Environments like DaskEnvironments. I have seen a lot of people make that migration smoothly
l

Leon Kozlowski

05/05/2022, 9:45 PM
Got it - I use a helm chart to deploy my prefect agent, which exposes a secret:
PREFECT__CLOUD__AGENT__AUTH_TOKEN
that contains the api key I created for my agent service account - Does this just have to be replaced with
PREFECT__CLOUD__API_KEY
or should they both remain in the chart? Based on the
deployment.yaml
I’m seeing in the source code they should both exist
k

Kevin Kho

05/05/2022, 9:46 PM
0.15.0 and above uses key now
token is for backward compatibility
l

Leon Kozlowski

05/05/2022, 9:48 PM
Ok so I created service accounts for both of the agents that I use, that means Ill just set the
PREFECT__CLOUD__API_KEY
to that value
k

Kevin Kho

05/05/2022, 10:20 PM
yeah exactly
🙌 1
10 Views