o-nikolas commented on code in PR #23490:
URL: https://github.com/apache/airflow/pull/23490#discussion_r868347542
##########
airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -380,9 +380,15 @@ def _exec_pod_command(self, resp, command: str) ->
Optional[str]:
resp.write_stdin(command + '\n')
while resp.is_open():
resp.update(timeout=1)
- if resp.peek_stdout():
- return resp.read_stdout()
- if resp.peek_stderr():
- self.log.info("stderr from command: %s",
resp.read_stderr())
+ res = None
+ while resp.peek_stdout():
+ res = res + resp.read_stdout()
+ if res:
+ return res
Review Comment:
I'm just noticing this now (and maybe it's related to how this API works
that I'm not familiar with) but won't this return stop us from logging any of
the stderr below? Or is it the case that only one or the other is returned
(which seems odd to me, but I'm not very familiar with kubernetes).
--
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]