idantepper commented on code in PR #39151:
URL: https://github.com/apache/airflow/pull/39151#discussion_r1590013148


##########
airflow/providers/amazon/aws/operators/s3.py:
##########
@@ -503,23 +510,36 @@ def __init__(
         self.bucket = bucket
         self.keys = keys
         self.prefix = prefix
+        self.from_datetime = from_datetime
+        self.to_datetime = to_datetime
         self.aws_conn_id = aws_conn_id
         self.verify = verify
 
         self._keys: str | list[str] = ""
 
-        if not exactly_one(prefix is None, keys is None):
-            raise AirflowException("Either keys or prefix should be set.")
+        if not exactly_one(keys is None, all(var is None for var in [prefix, 
from_datetime, to_datetime])):

Review Comment:
   We need to get either the specific keys that are going to be deleted or at 
least one of the other variables, we use these variables for retrieving the 
keys from the hook. 
   If none of the variables are given so we won't be able to delete at all😅



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