eladkal commented on code in PR #74399:
URL: https://github.com/apache/airflow/pull/74399#discussion_r4214789164


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/eks/eks_executor.py:
##########
@@ -0,0 +1,145 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""AwsEksExecutor: run Airflow tasks as pods on an Amazon EKS cluster."""
+
+from __future__ import annotations
+
+import os
+from typing import TYPE_CHECKING
+
+from airflow.providers.common.compat.sdk import conf
+
+try:
+    from kubernetes.client.rest import ApiException
+
+    from airflow.providers.cncf.kubernetes import __version__ as 
cncf_kubernetes_version
+    from airflow.providers.cncf.kubernetes.executors.kubernetes_executor 
import KubernetesExecutor
+    from airflow.providers.cncf.kubernetes.get_provider_info import (
+        get_provider_info as get_cncf_kubernetes_provider_info,
+    )
+except ImportError as e:
+    raise ImportError(
+        "AwsEksExecutor requires the cncf.kubernetes provider; install it with 
"
+        "pip install 'apache-airflow-providers-amazon[cncf.kubernetes]'"
+    ) from e
+
+from airflow.providers.amazon.aws.executors.eks.utils import (
+    CONFIG_DEFAULTS,
+    CONFIG_GROUP_NAME,
+    AllEksConfigKeys,
+)
+
+# Import paths, because cncf.kubernetes re-resolves the factories in each 
process (see _client_factory).
+_FACTORY_MODULE = "airflow.providers.amazon.aws.executors.eks._client_factory"
+_CLIENT_FACTORY_PATH = f"{_FACTORY_MODULE}._get_eks_kube_client"
+_ASYNC_CLIENT_FACTORY_PATH = f"{_FACTORY_MODULE}._get_eks_async_kube_client"
+# Only used in the error message below. The check looks for the client_factory 
option instead of
+# comparing versions, because an unreleased source tree still reports the 
previous release.
+MIN_CNCF_KUBERNETES_VERSION = "10.24.0"
+
+
+class AwsEksExecutor(KubernetesExecutor):

Review Comment:
   Is that the naming convention?
   Shouldn't it be just EksExecutor?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to