[v13] Fix incorrect Kubernetes event watcher chunking#35196
Merged
tigrato merged 1 commit intobranch/v13from Nov 30, 2023
Merged
[v13] Fix incorrect Kubernetes event watcher chunking#35196tigrato merged 1 commit intobranch/v13from
tigrato merged 1 commit intobranch/v13from
Conversation
Improve handling of streaming events in response to non-chunked content-type from the Kubernetes API. Previously, when dealing with streaming events, the code streamed the response into the target connection. However, the Kubernetes API did not provide the content-type as chunked. This lack of information caused the forwarder to be unaware that the connection was chunked. Consequently, the forwarder delayed response writing by buffering it, intending to minimize the number of writes. In scenarios where the connection stream was busy with events, users might not receive individual events as chunks, leading to incomplete data. This could result in users receiving malformed JSON, triggering an abort of the process. To address this issue, this commit introduces a modification. After each event, the response is now flushed to ensure that users receive the event as a complete and well-formed chunk. This adjustment improves the reliability and integrity of the data received by users during streaming events. Fixes #34977 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Contributor
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
zmb3
approved these changes
Nov 30, 2023
AntonAM
approved these changes
Nov 30, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #34981 to branch/v13
Changelog: Improved streaming event handling for Kubernetes API by flushing response after each event, ensuring complete, well-formed chunks.