hussein-awala commented on code in PR #35992:
URL: https://github.com/apache/airflow/pull/35992#discussion_r1411382275
##########
airflow/providers/amazon/aws/triggers/emr.py:
##########
@@ -461,4 +460,9 @@ def __init__(
)
def hook(self) -> AwsGenericHook:
- return self.hook_instance
+ return EmrServerlessHook(self.aws_conn_id)
+
+ @property
+ def hook_instance(self) -> AwsGenericHook:
+ """This property is added for backward compatibility."""
+ return self.hook()
Review Comment:
I added `hook_instance` as a property, so it will be available when the user
tries to access it, but it's lazy evaluated and created only when accessing it.
That makes the change backward compatible.
--
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]