https://prefect.io logo
#prefect-server
Title
# prefect-server
i

Ievgenii Martynenko

05/09/2022, 8:49 AM
Hi, Yesterday we faced 2 issues with Prefect flow which uses K8s job_template. When job started it started to fail with not very useful:
Copy code
'str' object has no attribute 'setdefault'
after examining code we understood that issue comes from https://github.com/PrefectHQ/prefect/blob/9b5fb783d64299a180e5a54ed88ca6d4a1f8fb90/src/prefect/agent/kubernetes/agent.py#L490 . It could be an access issue or missing file, or even a typo in yaml file. There is no error handling or checks to point to root cause properly. MIght be a good minor story to add checks and throw proper exception.
a

Anna Geller

05/09/2022, 9:58 AM
Are you looking for support to fix the job template issue or is this just a feature request to add more checks, or both? Did you manage to solve it?
i

Ievgenii Martynenko

05/09/2022, 12:26 PM
I managed to debug and understood the root cause; This is purely a feature request to add more checks when working with yaml.
a

Anna Geller

05/09/2022, 12:35 PM
I see, thanks. Why did you pick that specific branch/commit? this in master seems to be the same https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/kubernetes/agent.py#L490
i

Ievgenii Martynenko

05/09/2022, 1:33 PM
I didn't fix anything, just put a pointer to the place where error comes from.
a

Anna Geller

05/09/2022, 1:40 PM
ok thx
18 Views