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 2020/12/16 23:27:14 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #13115: Decode Remote Google Logs

turbaszek commented on a change in pull request #13115:
URL: https://github.com/apache/airflow/pull/13115#discussion_r544696994



##########
File path: airflow/providers/google/cloud/log/gcs_task_handler.py
##########
@@ -153,6 +153,10 @@ def _read(self, ti, try_number, metadata=None):
         try:
             blob = storage.Blob.from_string(remote_loc, self.client)
             remote_log = blob.download_as_string()
+
+            if isinstance(remote_log, bytes):
+                remote_log = remote_log.decode()

Review comment:
       I would say that this should be part of `download_as_string` method. The name suggest that the output should be a `str` not `bytes` so fixing it there may solve some issues in future. 




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