LamaAni / KubernetesJobOperator

An airflow operator that executes a task in a kubernetes cluster, given a kubernetes yaml configuration or an image refrence.
57 stars 8 forks source link

Error after upgrading to airflow 2.3.3 #63

Closed miv closed 2 years ago

miv commented 2 years ago

Describe the bug

Job can't start with error

Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow_kubernetes_job_operator/kubernetes_job_operator.py", line 368, in execute
    on_kube_api_event=lambda event: self.handle_kube_api_event(
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow_kubernetes_job_operator/job_runner.py", line 302, in execute_job
    watchable_kinds = GetAPIVersions.get_existing_api_kinds(self.client, all_kinds)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow_kubernetes_job_operator/kube_api/queries.py", line 410, in get_existing_api_kinds
    return [k for k in all_kinds if k.api_version == "v1" or k.api_version in apis]
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow_kubernetes_job_operator/kube_api/queries.py", line 410, in <listcomp>
    return [k for k in all_kinds if k.api_version == "v1" or k.api_version in apis]
TypeError: argument of type 'NoneType' is not iterable

To Reproduce

Run any job

Env: Airflow docker 2.3.3

LamaAni commented 2 years ago

Hi, sorry just saw this. I'll try and retest is when possible.

LamaAni commented 2 years ago

Currently I cant reproduce this. Can you give more details? DId you change the kubeapi in any way? Did you add any special handlers?