gitstart-airflow commented on code in PR #24039:
URL: https://github.com/apache/airflow/pull/24039#discussion_r886705126
##########
airflow/providers/google/cloud/transfers/gcs_to_gcs.py:
##########
@@ -341,6 +345,8 @@ def _copy_source_without_wildcard(self, hook, prefix):
raise AirflowException(msg)
for source_obj in objects:
+ if self.exact_match and (source_obj != prefix or not
source_obj.endswith(prefix)):
+ continue
Review Comment:
@uranusjr That's the issue. According to this issue #22675 , treating these
objects as prefix copies objects from the source bucket that has no match with
the specified ```source_object```. So, checking ```not
source_obj.endswith(prefix)``` makes sure we only copy the exact match and not
copying all objects with the same prefix as the ```source_objext```
--
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]