-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
grpc to support empty response. #1009
Conversation
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.
Couple of nits, LGTM otherwise
@@ -54,7 +54,7 @@ void RpcChannelImpl::onSuccess(Http::MessagePtr&& http_response) { | |||
|
|||
// A gRPC response contains a 5 byte header. Currently we only support unary responses so we | |||
// ignore the header. @see serializeBody(). | |||
if (!http_response->body() || !(http_response->body()->length() > 5)) { | |||
if (!http_response->body() || !(http_response->body()->length() >= 5)) { |
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.
nit: http_response->body()->length() < 5, seems to be more readable
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.
Done
|
||
Http::MessagePtr response_http_message(new Http::ResponseMessageImpl( | ||
Http::HeaderMapPtr{new Http::TestHeaderMapImpl{{":status", "200"}}})); | ||
helloworld::HelloReply inner_response; |
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.
nit: empty_response might be more clear
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.
Done
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.
Thanks @qiwzhang. Have you signed the CLA?
Http::MessagePtr response_http_message(new Http::ResponseMessageImpl( | ||
Http::HeaderMapPtr{new Http::TestHeaderMapImpl{{":status", "200"}}})); | ||
helloworld::HelloReply inner_response; | ||
response_http_message->body() = Common::serializeBody(inner_response); |
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.
Can you add an EXPECT
on the serialized body size being 5 bytes?
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.
Done
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.
@htuch CLA is signed, waiting for your final approval.
Automatic merge from submit-queue. Update OWNERS **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
Description: deleting until OOM is fixed. Risk Level: med - no coverage run. Although it was already broken per #1009 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
Description: update clang, install lcov, and bring back coverage for CI. Risk Level: low Testing: CI Fixes #1009 #1012 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
Description: deleting until OOM is fixed. Risk Level: med - no coverage run. Although it was already broken per #1009 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
Description: update clang, install lcov, and bring back coverage for CI. Risk Level: low Testing: CI Fixes #1009 #1012 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
No description provided.