mik-laj commented on a change in pull request #10365:
URL: https://github.com/apache/airflow/pull/10365#discussion_r472027732



##########
File path: airflow/providers/google/cloud/log/gcs_task_handler.py
##########
@@ -144,28 +174,15 @@ def gcs_write(self, log, remote_log_location):
         :type remote_log_location: str (path)
         """
         try:
-            old_log = self.gcs_read(remote_log_location)
+            blob = storage.Blob.from_string(remote_log_location, self.client)
+            old_log = blob.download_as_string()
             log = '\n'.join([old_log, log]) if old_log else log
         except Exception as e:  # pylint: disable=broad-except

Review comment:
       I wrote a message to the log  Thanks.

##########
File path: airflow/providers/google/cloud/log/gcs_task_handler.py
##########
@@ -123,16 +163,6 @@ def _read(self, ti, try_number, metadata=None):
             log += local_log
             return log, metadata
 
-    def gcs_read(self, remote_log_location):
-        """
-        Returns the log found at the remote_log_location.
-
-        :param remote_log_location: the log's location in remote storage
-        :type remote_log_location: str (path)
-        """
-        bkt, blob = self.parse_gcs_url(remote_log_location)
-        return self.hook.download(bkt, blob).decode('utf-8')
-
     def gcs_write(self, log, remote_log_location):
         """
         Writes the log to the remote_log_location. Fails silently if no hook

Review comment:
       Updated.




----------------------------------------------------------------
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:
[email protected]


Reply via email to