airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] ashb commented on a change in pull request #6313: [AIRFLOW-5643] Reduce duplicated logic in S3Hook
Date Wed, 16 Oct 2019 10:14:24 GMT
ashb commented on a change in pull request #6313: [AIRFLOW-5643] Reduce duplicated logic in
S3Hook
URL: https://github.com/apache/airflow/pull/6313#discussion_r335390896
 
 

 ##########
 File path: airflow/hooks/S3_hook.py
 ##########
 @@ -487,20 +485,8 @@ def load_bytes(self,
             by S3 and will be stored in an encrypted form while at rest in S3.
         :type encrypt: bool
         """
-        if not bucket_name:
-            (bucket_name, key) = self.parse_s3_url(key)
-
-        if not replace and self.check_for_key(key, bucket_name):
-            raise ValueError("The key {key} already exists.".format(key=key))
-
-        extra_args = {}
-        if encrypt:
-            extra_args['ServerSideEncryption'] = "AES256"
-
-        filelike_buffer = io.BytesIO(bytes_data)
-
-        client = self.get_conn()
-        client.upload_fileobj(filelike_buffer, bucket_name, key, ExtraArgs=extra_args)
 
 Review comment:
   This appears to have removed extra_args!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message