yuseok89 commented on code in PR #73269:
URL: https://github.com/apache/airflow/pull/73269#discussion_r4079286927
##########
providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:
##########
@@ -109,16 +109,25 @@ def execute(self, context: Context):
self.log.info("Getting files in s3://%s/%s", self.s3_bucket,
self.s3_key)
all_keys = s3_hook.list_keys(bucket_name=self.s3_bucket,
prefix=self.s3_key) or []
filenames = [k[len(self.s3_key) :] for k in all_keys]
- if self.s3_filenames == "*":
+ s3_prefix: str = self.s3_filenames
+ if s3_prefix == "*":
files = filenames
else:
- s3_prefix: str = self.s3_filenames
- files = [f for f in filenames if s3_prefix in f]
+ files = [f for f in filenames if f.startswith(s3_prefix)]
+ dropped = [f for f in filenames if s3_prefix in f and not
f.startswith(s3_prefix)]
+ if dropped:
+ self.log.warning(
Review Comment:
Makes sense. The warning now keeps the full count and names only the first
10 entries, with the rest summarized as "and N more". Same in all four
operators.
--
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]