Repository navigation
Negotiate WebSocket v5 in the async exec client - #2797
brendandburns wants to merge 1 commit into
Conversation
* fix: negotiate async WebSocket v5 with v4 fallback
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
can we have an e2e test? |
|
Yes, we have two, one sync, one async in the repo. /assign @aojea |
Async exec offered only v4.channel.k8s.io, causing upgrade failures with servers requiring v5. The client now offers v5 with v4 fallback and handles v5 channel-close frames in buffered responses.
Negotiation: Use aiohttp’s subprotocol negotiation and preserve explicitly configured subprotocol headers.
Sec-WebSocket-Protocol: v5.channel.k8s.io,v4.channel.k8s.io
Channel closure: Buffered responses stop collecting data from a channel after its v5 close frame while continuing to collect other channels.
Raw streams: Return the unprocessed aiohttp WebSocket; callers remain responsible for channel framing and close messages.
Fixes brendandburns#14
Fixes: #2355