1inuxoid commented on code in PR #29452:
URL: https://github.com/apache/airflow/pull/29452#discussion_r1109842430
##########
airflow/providers/amazon/aws/transfers/dynamodb_to_s3.py:
##########
@@ -118,10 +131,18 @@ def __init__(
self.dynamodb_scan_kwargs = dynamodb_scan_kwargs
self.s3_bucket_name = s3_bucket_name
self.s3_key_prefix = s3_key_prefix
- self.aws_conn_id = aws_conn_id
+ if aws_conn_id is not NOTSET:
+ warnings.warn(_DEPRECATION_MSG, DeprecationWarning, stacklevel=3)
+ self.source_aws_conn_id = aws_conn_id
+ else:
+ self.source_aws_conn_id = source_aws_conn_id
+ if dest_aws_conn_id is NOTSET:
+ self.dest_aws_conn_id = self.source_aws_conn_id
+ else:
+ self.dest_aws_conn_id = dest_aws_conn_id
Review Comment:
@Taragolis I need your advise here please.
None of the other AWS test suites seems to do any assertions on the warning
message about deprecation (i.e. `parameter has been deprecated`) (3 other
operators are using it: `image_attachment_to_s3`, `s3_to_sftp`, `mongo_to_s3`),
and my code doesn't raise an Exception.
Do you still think it's necessary to assert that the warning is present? If
so, why wasn't it done this way in any of those other test suites?
--
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]