raphaelauv commented on code in PR #76497:
URL: https://github.com/apache/airflow/pull/76497#discussion_r4618635605


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -1049,14 +1049,17 @@ def extract_xcom_json(self, pod: V1Pod) -> str:
                 stderr=True,
                 tty=False,
                 _preload_content=False,
+                binary=True,
             )
         ) as client:
             self.log.info("Running command... %s", command)
             client.run_forever()
             if client.peek_stderr():
-                stderr = client.read_stderr()
+                stderr = client.read_stderr().decode("utf-8", errors="replace")
                 self.log.error("stderr from command: %s", stderr)
-            result = client.read_all()
+            raw_result = client.read_all()

Review Comment:
   The XCOM sidecar read JSON file to stdout , until user custom that it's 
always stdout. So let's keep it like that



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to