ohadmata commented on a change in pull request #6998: [AIRFLOW-6404] - ANSI 
color support for WebUI logger
URL: https://github.com/apache/airflow/pull/6998#discussion_r366244084
 
 

 ##########
 File path: airflow/contrib/kubernetes/pod_launcher.py
 ##########
 @@ -122,6 +122,8 @@ def _monitor_pod(self, pod, get_logs):
         if get_logs:
             logs = self.read_pod_logs(pod)
             for line in logs:
+                if isinstance(line, bytes):
+                    line = line.decode('utf-8').strip()
 
 Review comment:
   Yes, by default the pod_launcher return the pod log as a binary data, 
   The ANSI coloring for the kubernetes operator worked only after this change.
   There is no reason to stdout log as a binary string (aka b'log')

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


With regards,
Apache Git Services

Reply via email to