Taragolis commented on code in PR #28509:
URL: https://github.com/apache/airflow/pull/28509#discussion_r1053824118


##########
airflow/providers/amazon/aws/operators/eks.py:
##########
@@ -26,7 +26,13 @@
 from airflow import AirflowException
 from airflow.models import BaseOperator
 from airflow.providers.amazon.aws.hooks.eks import EksHook
-from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import 
KubernetesPodOperator
+
+try:
+    from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import 
KubernetesPodOperator
+except ImportError as e:
+    from airflow.exceptions import AirflowOptionalProviderFeatureException
+
+    raise AirflowOptionalProviderFeatureException(e)

Review Comment:
   Hmmmm... It appears that if user did not install `cncf.kubernetes` extra 
then all other operators in this module unavailable.
   
   All other operators, as far as I know, use AWS API. So is it better move 
this operator into separate module as follow up?



##########
airflow/providers/amazon/provider.yaml:
##########
@@ -576,3 +576,8 @@ secrets-backends:
 logging:
   - airflow.providers.amazon.aws.log.s3_task_handler.S3TaskHandler
   - 
airflow.providers.amazon.aws.log.cloudwatch_task_handler.CloudwatchTaskHandler
+
+additional-extras:
+  - name: cncf.kubernetes
+    dependencies:
+      - apache-airflow-providers-cncf-kubernetes>=5.0.0

Review Comment:
   I thought this is automatically added as extra dependency, at least it 
listed in https://pypi.org/pypi/apache-airflow-providers-amazon/json or maybe 
we need specific version of provider?



-- 
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