syedahsn commented on code in PR #31960: URL: https://github.com/apache/airflow/pull/31960#discussion_r1236439355
########## airflow/providers/amazon/aws/operators/eks.py: ########## @@ -59,7 +59,55 @@ FARGATE_FULL_NAME = "AWS Fargate profiles" -class EksCreateClusterOperator(BaseOperator): +class BaseEksCreateOperator(BaseOperator): + """ + Base class for EKS Operators that create cluster resources. This includes + EksCreateClusterOperator, EksCreateNodeGroupOperator and EksCreateFargateProfileOperator. + + """ + + def __init__(self, **kwargs): + self.eks_hook = EksHook(aws_conn_id=self.aws_conn_id, region_name=self.region) + super().__init__(**kwargs) + + def create_compute(self): Review Comment: I made this change, and it ended up having a bigger impact than I anticipated. I had to add a bunch of parameters used in the 3 child classes. I think I've got everything ready. I need to do some testing with how templating works here. Right now, `_BaseEksCreateOperator` doesn't have any templated fields, but because the child classes allow templating for some parameters, I think I have to do the same for `_BaseEksCreateOperator`. @uranusjr what do you think? -- 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]
