Yao-ATG opened a new issue, #23162:
URL: https://github.com/apache/airflow/issues/23162

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   Latest
   
   ### Apache Airflow version
   
   2.2.5 (latest released)
   
   ### Operating System
   
   MacOS 12.2.1
   
   ### Deployment
   
   Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   Ran the same DAG twice with 'replace = False', in the second run files are 
overwritten anyway.
   source_object does not include wildcard.
   
   Not sure whether this incorrect behavior happens to "with wildcard" 
scenario, but from source code
   
https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/transfers/gcs_to_gcs.py
 
   in line 346 (inside _copy_source_with_wildcard) we have
         if not self.replace:
   but in _copy_source_without_wildcard we don't check self.replace at all.
   
   ### What you think should happen instead
   
   When 'replace = False', the second run should skip copying files since they 
are already there.
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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