You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2025/04/08 12:44:11 UTC

Re: [PR] Update EKS Operators and Sensors to inherit AWS base classes [airflow]

vincbeck commented on code in PR #48192:
URL: https://github.com/apache/airflow/pull/48192#discussion_r2033111460


##########
providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:
##########
@@ -253,20 +253,22 @@ def __init__(
         self.wait_for_completion = wait_for_completion
         self.waiter_delay = waiter_delay
         self.waiter_max_attempts = waiter_max_attempts
-        self.aws_conn_id = aws_conn_id
-        self.region = region
         self.nodegroup_name = nodegroup_name
         self.create_nodegroup_kwargs = create_nodegroup_kwargs or {}
         self.fargate_selectors = fargate_selectors or [{"namespace": DEFAULT_NAMESPACE_NAME}]
         self.fargate_profile_name = fargate_profile_name
         self.deferrable = deferrable
+        self.region = region
         super().__init__(
             **kwargs,
         )
 
-    @cached_property
-    def hook(self) -> EksHook:
-        return EksHook(aws_conn_id=self.aws_conn_id, region_name=self.region)
+        if region is not None:
+            warnings.warn(
+                message="Parameter `region` will be deprecated. Use the parameter `region_name` instead",
+                category=AirflowProviderDeprecationWarning,
+                stacklevel=2,
+            )

Review Comment:
   Should we set `self.region = region_name` in that case?



-- 
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-unsubscribe@airflow.apache.org

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