-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Ensure oversized data frames are not written to spdystreams #70999
Ensure oversized data frames are not written to spdystreams #70999
Conversation
6cdb31c
to
1564048
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kubernetes/sig-api-machinery-pr-reviews |
/priority important-soon |
I think I get it now. /lgtm |
/milestone v1.13 |
@@ -305,6 +316,12 @@ func TestStream(t *testing.T) { | |||
} | |||
} | |||
|
|||
select { | |||
case <-requestReceived: | |||
case <-time.After(time.Second): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks flaky?
"io" | ||
) | ||
|
||
// readerWrapper delegates to an io.Reader so that only the io.Reader interface is implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What interface are you avoiding, and what is the problematic behavior it triggers?
e.g. maybe "readerNoCloser" will be more obvious, but I don't understand why Close() is problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoiding passing in a reader that implements WriteTo (linked to the problematic code path in the description)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't read the PR description carefully enough. But future readers of this code won't see it at all, so can you repeat that in the comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
/hold will address comments |
1564048
to
0202e26
Compare
New changes are detected. LGTM label has been removed. |
/hold cancel added comments and deflaked |
/assign @lavalamp |
only thing changed was the comment and the unit test timeout, retagging |
/lgtm |
/lgtm Isn't this a bug in the spdystream library? Shouldn't it split up the data? |
I think it's working as intended... they document their impl of Write to mean 1 write == 1 frame. That said, that doesn't play nice with standard io libraries |
What type of PR is this?
/kind bug
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes kubernetes/client-go#460
If the Stdin provided as input implements a
WriteTo
function, io.Copy uses it to attempt to write the entire buffer to the stream in one call, which results in a data frame that is too large and silently drops the outgoing frame.Does this PR introduce a user-facing change?: