ferruzzi commented on a change in pull request #18645:
URL: https://github.com/apache/airflow/pull/18645#discussion_r722712632



##########
File path: airflow/providers/amazon/aws/operators/eks.py
##########
@@ -93,21 +122,42 @@ def __init__(
         cluster_name: str,
         cluster_role_arn: str,
         resources_vpc_config: Dict,
+        compute: Optional[str] = DEFAULT_COMPUTE_TYPE,
         nodegroup_name: Optional[str] = None,
         nodegroup_role_arn: Optional[str] = None,
-        compute: Optional[str] = DEFAULT_COMPUTE_TYPE,
+        fargate_profile_name: Optional[str] = None,
+        fargate_pod_execution_role_arn: Optional[str] = None,
+        fargate_selectors: Optional[List] = None,
         aws_conn_id: str = DEFAULT_CONN_ID,
         region: Optional[str] = None,
         **kwargs,
     ) -> None:
+        if compute:
+            try:
+                if (compute == 'nodegroup') and not nodegroup_role_arn:
+                    raise ValueError(
+                        MISSING_ARN_MSG.format(compute=NODEGROUP_FULL_NAME, 
requirement='nodegroup_role_arn')
+                    )
+                if (compute == 'fargate') and not 
fargate_pod_execution_role_arn:
+                    raise ValueError(
+                        MISSING_ARN_MSG.format(
+                            compute=FARGATE_FULL_NAME, 
requirement='fargate_pod_execution_role_arn'
+                        )
+                    )
+            except KeyError:

Review comment:
       Should be addressed in 
https://github.com/apache/airflow/pull/18645/commits/b577f159075d1c6b75d90c54303041b78025f122




-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to