-
Notifications
You must be signed in to change notification settings - Fork 17
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
Implement stream operations in the conformance client #196
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9f82a3d
get client stream operations working -- all but 'client max message s…
jhump 0df45eb
get server stream operations working - some strange errors with grpc …
jhump 798285b
get half-duplex bidi stream operations working - timeouts aren't work…
jhump 3758032
get full-duplex bidi stream operations working - timeouts not working…
jhump 214c1c5
ready to merge to main
jhump ea06627
spotless apply
jhump ca1b463
add TODO about TLS client certs
jhump File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# OkHttp seems to have a bug where timeout is not properly | ||
# enforced when request body is full-duplex. | ||
Timeouts/HTTPVersion:2/**/bidi half duplex timeout | ||
Timeouts/HTTPVersion:2/**/bidi full duplex timeout | ||
|
||
# Connect-kotlin does not have a way to limit the size of messages | ||
# received. It probably should. Despite this, many cases in this suite | ||
# still pass, so they are likely not exercising what we think they are. | ||
# TODO: add flag to config yaml for whether implementation supports | ||
# a receive size limit | ||
Client Message Size/**/Compression:COMPRESSION_GZIP/TLS:false/**/client stream first request exceeds client limit | ||
Client Message Size/**/Compression:COMPRESSION_GZIP/TLS:false/**/client stream subsequent request exceeds client limit | ||
Client Message Size/**/Compression:COMPRESSION_GZIP/TLS:false/**/client stream all requests equal to client limit | ||
Client Message Size/**/Compression:COMPRESSION_GZIP/TLS:false/**/server stream request equal to client limit | ||
Client Message Size/**/Compression:COMPRESSION_GZIP/TLS:false/**/server stream request exceeds client limit |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This configures the features that this client | ||
# supports and that will be verified by the | ||
# conformance test suite. | ||
features: | ||
versions: | ||
- HTTP_VERSION_1 | ||
- HTTP_VERSION_2 | ||
protocols: | ||
- PROTOCOL_CONNECT | ||
- PROTOCOL_GRPC | ||
- PROTOCOL_GRPC_WEB | ||
codecs: | ||
- CODEC_PROTO | ||
# Lite does not support JSON | ||
compressions: | ||
- COMPRESSION_IDENTITY | ||
- COMPRESSION_GZIP | ||
streamTypes: | ||
# This config file only runs stream RPC test cases. | ||
- STREAM_TYPE_CLIENT_STREAM | ||
- STREAM_TYPE_SERVER_STREAM | ||
- STREAM_TYPE_HALF_DUPLEX_BIDI_STREAM | ||
- STREAM_TYPE_FULL_DUPLEX_BIDI_STREAM |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I've removed the line about client certs since this property defaults to false. An error is occurring when this code tries to instantiate a client cert from the data in the conformance request. I haven't dug into it, and decided to just omit it for now.
It turns out that we actually can't do half-duplex stuff over HTTP 1.1, because we don't actually know ahead of time, for a given bidi RPC, if it's half-duplex or full-duplex (in the framework, based on generated protobuf metadata). But the request body must be marked as "duplex" if it might be full-duplex. So have to mark the body as duplex for all bidi RPCs, and okhttp then disallows them to be used with HTTP 1.1.
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.
Do we want to comment these properties out with a
TODO
to know to come back to them instead of removing them? Up to you but might help identify remaining work since it sounds like there are several things to track down.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.
Well, I think we can leave the
supportsHalfDuplexBidiOverHttp1
out since there's no realistic way of changing that. But, yes, I should add backsupportsTlsClientCerts
with a TODO to get them working.