You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/23 16:26:35 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #16012: Fixing s3 hook load_file use in glue operator

uranusjr commented on a change in pull request #16012:
URL: https://github.com/apache/airflow/pull/16012#discussion_r637570162



##########
File path: airflow/providers/amazon/aws/operators/glue.py
##########
@@ -101,7 +101,8 @@ def execute(self, context):
         if self.script_location and not self.script_location.startswith(self.s3_protocol):
             s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
             script_name = os.path.basename(self.script_location)
-            s3_hook.load_file(self.script_location, self.s3_bucket, self.s3_artifacts_prefix + script_name)
+            s3_hook.load_file(self.script_location, self.s3_artifacts_prefix + script_name, bucket_name=self.s3_bucket)
+            self.script_location = f"s3://{self.s3_bucket}/{self.s3_artifacts_prefix + script_name}"

Review comment:
       This value should be resolved in `__init__()` instead.




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