pankajkoti commented on code in PR #35960:
URL: https://github.com/apache/airflow/pull/35960#discussion_r1409553054


##########
airflow/providers/amazon/aws/hooks/ec2.py:
##########
@@ -85,7 +85,7 @@ def get_instance(self, instance_id: str, filters: list | None 
= None):
         :return: Instance object
         """
         if self._api_type == "client_type":
-            return self.get_instances(filters=filters, 
instance_ids=[instance_id])
+            return self.get_instances(filters=filters, 
instance_ids=[instance_id])[0]

Review Comment:
   The method seems to return a single instance with the default 
api_type="resource_type". Similarly, this method should return a single 
instance for other api_types, so I would treat it as a bug fix. Also, it's 
named as get_instance so the expectation would be a single instance to be 
returned.



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