Taragolis commented on code in PR #34222:
URL: https://github.com/apache/airflow/pull/34222#discussion_r1320270376


##########
airflow/providers/amazon/aws/triggers/rds.py:
##########
@@ -129,16 +130,21 @@ def __init__(
         waiter_max_attempts: int,
         aws_conn_id: str,
         response: dict[str, Any],
-        db_type: RdsDbType,
+        db_type: RdsDbType | str,
         region_name: str | None = None,
     ) -> None:
+        # allow passing enums for users,
+        # but we can only rely on strings because (de-)serialization doesn't 
support enums
+        if isinstance(db_type, RdsDbType):
+            db_type = db_type.value
+
         super().__init__(
             serialized_fields={
                 "db_identifier": db_identifier,
                 "response": response,
                 "db_type": db_type,
             },
-            waiter_name=f"db_{db_type.value}_available",
+            waiter_name=f"db_{db_type}_available",

Review Comment:
   After serde this value would be `RdsDbType.INSTANCE`.
   We have same problem in ECS sensors/operators in the past, see 
https://github.com/apache/airflow/pull/29871



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