davidpr91 opened a new issue #21388:
URL: https://github.com/apache/airflow/issues/21388


   ### Description
   
   Right now when using GCSToGCSOperator to copy a file from one bucket to 
another, if the source file does not exist, nothing happens and the task is 
considered successful. This could be good for some use cases, for example, when 
you want to copy different files but they are not required to exist. 
   But for some other cases, it might be useful to raise an exception if the 
source file can't be found. Otherwise, the task would be failing silently.
   My proposal is to add a new flag to GCSToGCSOperator to enable this feature. 
By default, for backward compatibility, the behaviour would be the current one. 
But it would be possible to force the source file to be required and mark the 
task as failed if it doesn't exist.
   
   ### Use case/motivation
   
   Task would fail if the source file to copy does not exist, but only in the 
case you enable it.
   
   ### Related issues
   
   If you want to be sure that the source file exists and it will be copied on 
every execution, currently the operator does not allow you to make the task 
fail. If the status is successful but nothing is written in the destination, it 
would be failing silently.
   
   ### Are you willing to submit a PR?
   
   - [X] 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