Taragolis commented on code in PR #34222:
URL: https://github.com/apache/airflow/pull/34222#discussion_r1320353268
##########
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:
Ahh... well ok miss that.
So then we need to validate is string value presented in `RdsDbType`
otherwise
--
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]