potiuk commented on a change in pull request #8304: [Airflow-5565] Add 
extra_args param to s3hook
URL: https://github.com/apache/airflow/pull/8304#discussion_r408587530
 
 

 ##########
 File path: airflow/providers/amazon/aws/hooks/s3.py
 ##########
 @@ -576,19 +578,21 @@ def load_file_obj(self,
             object to be uploaded
         :type acl_policy: str
         """
-        self._upload_file_obj(file_obj, key, bucket_name, replace, encrypt, 
acl_policy)
+        self._upload_file_obj(file_obj, key, bucket_name, replace, encrypt, 
acl_policy, extra_args)
 
     def _upload_file_obj(self,
                          file_obj,
                          key,
                          bucket_name=None,
                          replace=False,
                          encrypt=False,
-                         acl_policy=None):
+                         acl_policy=None,
+                         extra_args=None):
         if not replace and self.check_for_key(key, bucket_name):
             raise ValueError("The key {key} already exists.".format(key=key))
 
-        extra_args = {}
+        if not extra_args:
 
 Review comment:
   You should make a deepcopy of the extra_args otherwise you can mutate 
external args with the next line.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to