njrs92 opened a new pull request #21458:
URL: https://github.com/apache/airflow/pull/21458
There is a bug when an empty list is passed into S3DeleteObjectsOperator
from another task it will try and deleted all keys on the bucket. While the
intent of passing in an empty prefix might be to delete all keys, the intent of
passing in a empty keys list would be to delete no keys.
This is because I assume templating does something with __init__ so the
check for this condition is not run.
The case is:
In line 379 because keys is an empty list it is false so keys is now
assigned the return values from list_keys which when passed no prefix will
return all keys.
The change is to move the xor check of keys or prefix is inside the execute
function to ensure it is checked at run time
--
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]