You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/29 16:20:51 UTC

[GitHub] [airflow] ferruzzi commented on a diff in pull request #26003: Add RdsInstanceSensor to amazon provider package

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


##########
airflow/providers/amazon/aws/sensors/rds.py:
##########
@@ -61,7 +64,9 @@ 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))
+            return bool(items) and any(
+                map(lambda s: items[0][self.check_status_field].lower() == s, self.target_statuses)

Review Comment:
   Nitpick:  Can you rename `s` here to something useful?



##########
tests/providers/amazon/aws/sensors/test_rds.py:
##########
@@ -50,15 +51,18 @@
 EXPORT_TASK_SOURCE = 'arn:aws:rds:es-east-1::snapshot:my-db-instance-snap'
 
 
-def _create_db_instance_snapshot(hook: RdsHook):
+def _create_db_instance(hook: RdsHook):
     hook.conn.create_db_instance(
         DBInstanceIdentifier=DB_INSTANCE_NAME,
-        DBInstanceClass='db.m4.large',
-        Engine='postgres',
+        DBInstanceClass="db.t4g.micro",

Review Comment:
   Have you tested this?  The 'large' is the smallest option on the AWS console when creating a new RDS instance.  In fact, I just checked to verify that and the m4 generation isn't even an option in their dropdown anymore, it's only gen 5 or gen 6 now.  I just want to make sure it'll run alright with the lower specs.  I know the RDS Export system test takes about 20 minutes to run on the `large`, I'm not sure how much longer this is going to add.



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