seanghaeli commented on code in PR #73269:
URL: https://github.com/apache/airflow/pull/73269#discussion_r4050952718


##########
providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:
##########
@@ -135,17 +135,17 @@ def execute(self, context: Context):
                     path=self.ftp_path,
                 )
 
-                if self.ftp_filenames == "*":
+                ftp_prefix: str = self.ftp_filenames
+                if ftp_prefix == "*":
                     files = list_dir
                 else:
-                    ftp_filename: str = self.ftp_filenames
-                    files = [f for f in list_dir if ftp_filename in f]
+                    files = [f for f in list_dir if f.startswith(ftp_prefix)]

Review Comment:
   I am against a deprecation cycle for this change, as the docs are already 
clear in what the function *should* be doing. I'm in favor of logging a warning 
for users when there exists a non-prefix match that would have happened under 
the substring behavior prior to this PR.



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