-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix an OverflowError in readline_channel and enhance timeout handling #1989
base: master
Are you sure you want to change the base?
Fix an OverflowError in readline_channel and enhance timeout handling #1989
Conversation
|
Welcome @Masterchen09! |
/assign @yliaog |
please add unit test cases in ws_client_test.py |
cfac7ca
to
2ec760a
Compare
@yliaog I am not sure how I could test the websocket in an unit test (there aren't any test cases related to the websocket in ws_client_test.py yet)...however I have noticed that the websocket is more or less already tested in e2e_test/test_client.py, therefore I have added some more checks there to test different timeout values when using readline_channel/readline_stdout. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages 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 PRs. This bot triages 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 PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
2ec760a
to
8a65ebb
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Masterchen09 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. 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-sigs/prow repository. |
/reopen |
@Masterchen09: Reopened this PR. 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-sigs/prow repository. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes an OverflowError caused by the readline_channel method in WSClient, when None is provided as a timeout value. Currently when None is provided, the timeout is internally set to infinity. The poll method and the select function in the update method cannot work with infinite timeouts, instead None or a negative value should be provided (see here and here). Additionally the overall timeout handling is enhanced to be more consistent with the peek_channel method. There was also an inconsistency between the usage of the select function and the poll method in the update method when negative timeouts are provided, because the select function does not work with negative timeouts, this is also fixed.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: