Skip to content
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

[#11186] Change gRPC UNARY response based on header value #11215

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

donghun-cho
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 24.39024% with 31 lines in your changes missing coverage. Please review.

Project coverage is 36.99%. Comparing base (887ec53) to head (9b2ccc1).

Files Patch % Lines
...er/grpc/retry/GrpcRetryFriendlyServerResponse.java 0.00% 13 Missing ⚠️
...pinpoint/grpc/client/retry/RetryHeaderFactory.java 0.00% 6 Missing ⚠️
...iver/grpc/service/SimpleRequestHandlerAdaptor.java 0.00% 4 Missing ⚠️
.../main/java/com/navercorp/pinpoint/grpc/Header.java 33.33% 4 Missing ⚠️
.../provider/grpc/MetadataGrpcDataSenderProvider.java 50.00% 1 Missing and 1 partial ⚠️
...ercorp/pinpoint/grpc/server/AgentHeaderReader.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #11215   +/-   ##
=========================================
  Coverage     36.99%   36.99%           
- Complexity    12046    12048    +2     
=========================================
  Files          3980     3982    +2     
  Lines         97903    97938   +35     
  Branches      10418    10423    +5     
=========================================
+ Hits          36215    36230   +15     
- Misses        58713    58732   +19     
- Partials       2975     2976    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good equals and hashCode implemetations

Copy link
Contributor

@feelform feelform left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check about the new GrpcServerResponse type for the RetryFriendlyResponse?

@@ -49,7 +50,7 @@ public SimpleRequestHandlerAdaptor(String name, DispatchHandler<REQ, RES> dispat
public void request(Message<? extends REQ> message, StreamObserver<? extends RES> responseObserver) {
try {
final ServerRequest<? extends REQ> request = serverRequestFactory.newServerRequest(message);
final ServerResponse<? extends RES> response = new GrpcServerResponse<>(responseObserver);
final ServerResponse<? extends RES> response = new GrpcServerResponse<>(responseObserver, ServerContext.getAgentInfo().isRetryFriendlyResponse());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check create new GrpcServerResponse type for the RetryFriendlyResponse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with new GrpcRetryFriendlyServerResponse class

}

@Override
public void write(final T message) {
Objects.requireNonNull(message, "message");

if (retryFriendlyResponse) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check create new GrpcServerResponse type for the RetryFriendlyResponse?

@feelform
Copy link
Contributor

feelform commented Jul 3, 2024

LGTM

@feelform feelform merged commit 2226a97 into pinpoint-apm:master Jul 3, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change collector response to be gRPC client retries friendly
2 participants