Skip to content

Commit

Permalink
Display stderr logs as expected on K8s (#2696)
Browse files Browse the repository at this point in the history
## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->

Fixes #2693

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow committed May 11, 2023
1 parent 6da5c31 commit d4b72fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coordinator/gscoordinator/coordinator.py
Expand Up @@ -243,6 +243,7 @@ def ConnectSession(self, request, context):
# Session connected, fetch logs via gRPC.
self._streaming_logs = True
sys.stdout.drop(False)
sys.stderr.drop(False)

return message_pb2.ConnectSessionResponse(
session_id=self._session_id,
Expand Down Expand Up @@ -270,6 +271,7 @@ def CloseSession(self, request, context):

# Session closed, stop streaming logs
sys.stdout.drop(True)
sys.stderr.drop(True)
self._streaming_logs = False
return message_pb2.CloseSessionResponse()

Expand Down

0 comments on commit d4b72fd

Please sign in to comment.