Ievgenii Martynenko

    Ievgenii Martynenko

    4 months ago
    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:
    '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.
    Anna Geller

    Anna Geller

    4 months ago
    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?
    Ievgenii Martynenko

    Ievgenii Martynenko

    4 months ago
    I managed to debug and understood the root cause; This is purely a feature request to add more checks when working with yaml.
    Anna Geller

    Anna Geller

    4 months ago
    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
    Ievgenii Martynenko

    Ievgenii Martynenko

    4 months ago
    I didn't fix anything, just put a pointer to the place where error comes from.
    Anna Geller

    Anna Geller

    4 months ago
    ok thx