[stream/ws_client] Reading long stdout is truncated at 32768 chars #190
Comments
/assign |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
I'm seeing the same issue with kubernetes==11.0.0 not sure if it will fix the issue but i'm overriding the default _extract_xcom and _exec_pod_command to validate the json document returned and retry on error. Also i'm using run_forever with a timeout to have the wsclient concat the responses. Not sure if it is stable yet however... |
@Paul424 are there any issues/pulls you can link to? |
I spend today on trying various fixes, ultimately following code seems to work for me (sorry not yet in a PR). Notice this is Airflow code (KubernetesPodOperator). Changes i made:
I wanted to use _preload_content=True for both btw but couldn't since it would json load the content and then serialize it to string format. While i need the raw json string data instead. Btw root-cause is still unknown to me. And honestly these layers are also too complex for me to follow... `class PodLauncher_(PodLauncher):
` |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
This repo has been merged into the main python repo. We are archiving this repo. Please open a new issue in the main repo. Thanks! /close |
@roycaihw: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
python-base/stream/ws_client.py
Line 105 in b87a5fe
it seems that read_channel does not support data longer than 32768 (2**15) characters.
Below is the traceback for these lines. The line linked sends a command to a sidecar of a pod to get the result.json file that the pod dumps: it basically does
kubernetes.stream.stream.write_stdin('cat /file.json')
and then akubernetes.stream.stream.read_stdout()
which gives back the json truncated at 32768 characters. Here's the full json manually extracted from the pod: file.json.Is there a minimal working example/unittest anywhere we can a add long stdout to, so we can rule out our k8s config?
The text was updated successfully, but these errors were encountered: