hankehly commented on code in PR #26003:
URL: https://github.com/apache/airflow/pull/26003#discussion_r962435821


##########
airflow/providers/amazon/aws/sensors/rds.py:
##########
@@ -51,6 +50,12 @@ def _describe_item(self, item_type: str, item_name: str) -> 
list:
         elif item_type == 'export_task':
             exports = 
self.hook.conn.describe_export_tasks(ExportTaskIdentifier=item_name)
             return exports['ExportTasks']
+        elif item_type == "db_instance":
+            instances = 
self.hook.conn.describe_db_instances(DBInstanceIdentifier=item_name)
+            return instances["DBInstances"]
+        elif item_type == "db_cluster":

Review Comment:
   2022/09/05 update
   Added `db_cluster` to be consistent with 
https://github.com/apache/airflow/pull/21231 / 
https://github.com/apache/airflow/pull/20907



##########
airflow/providers/amazon/aws/sensors/rds.py:
##########
@@ -61,7 +66,14 @@ def _check_item(self, item_type: str, item_name: str) -> 
bool:
         except ClientError:
             return False
         else:
-            return bool(items) and any(map(lambda s: 
items[0]['Status'].lower() == s, self.target_statuses))
+            status_field = self._check_status_field()

Review Comment:
   2022/09/05 update
   Replaced instance variable with instance method to encapsulate if/else 
statement



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