diff --git a/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py b/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py index 40a27d70fdecf..11065ede7f28a 100644 --- a/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py +++ b/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py @@ -159,16 +159,7 @@ def _list_pods(self, query_kwargs): pods = [] for namespace in namespaces: - # Dynamic Client list pods is throwing TypeError when there are no matching pods to return - # This bug was fixed in MR https://github.com/kubernetes-client/python/pull/2155 - # TODO: Remove the try-except clause once we upgrade the K8 Python client version which - # includes the above MR - try: - pods.extend( - dynamic_client.get(resource=pod_resource, namespace=namespace, **query_kwargs).items - ) - except TypeError: - continue + pods.extend(dynamic_client.get(resource=pod_resource, namespace=namespace, **query_kwargs).items) return pods diff --git a/airflow/providers/cncf/kubernetes/provider.yaml b/airflow/providers/cncf/kubernetes/provider.yaml index 1bccaa52dfdfb..7a86779132565 100644 --- a/airflow/providers/cncf/kubernetes/provider.yaml +++ b/airflow/providers/cncf/kubernetes/provider.yaml @@ -97,13 +97,13 @@ dependencies: # limiting minimum airflow version supported in cncf.kubernetes provider, due to the # potential breaking changes in Airflow Core as well (kubernetes is added as extra, so Airflow # core is not hard-limited via install-requirements, only by extra). - - kubernetes>=28.1.0,<=29.0.0 + - kubernetes>=29.0.0,<=30.1.0 # The Kubernetes_asyncio package is used for providing Asynchronous (AsyncIO) client library for # standard Kubernetes API. The version is limited by minimum 18.20.1 because of introducing the ability to # load kubernetes config file from dictionary in that release and is limited to the next MAJOR version # (started from current 24.2.2 version) to prevent introducing some problems that could be due to some # major changes in the package. - - kubernetes_asyncio>=28.1.0,<=29.0.0 + - kubernetes_asyncio>=29.0.0,<=30.1.0 - google-re2>=1.0 integrations: diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index 44fd883ef1143..e35a22bfd42e6 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -364,8 +364,8 @@ "asgiref>=3.5.2", "cryptography>=41.0.0", "google-re2>=1.0", - "kubernetes>=28.1.0,<=29.0.0", - "kubernetes_asyncio>=28.1.0,<=29.0.0" + "kubernetes>=29.0.0,<=30.1.0", + "kubernetes_asyncio>=29.0.0,<=30.1.0" ], "devel-deps": [], "plugins": [],