Skip to content

Fix gRPC Retry Mechanism for Unsuccessful HTTP Responses - #6829

Merged
jack-berg merged 2 commits into
open-telemetry:mainfrom
JiwonKKang:grpc-retry
Oct 29, 2024
Merged

Fix gRPC Retry Mechanism for Unsuccessful HTTP Responses#6829
jack-berg merged 2 commits into
open-telemetry:mainfrom
JiwonKKang:grpc-retry

Conversation

@JiwonKKang

Copy link
Copy Markdown
Contributor

Changes:

  • Added a condition to trigger retries based on retryable gRPC status codes, even when the HTTP status is not 200.

Impact:
This fix ensures that gRPC requests are retried according to policy when encountering transient 503 errors, enhancing resilience in case of temporary unavailability.

@JiwonKKang
JiwonKKang requested a review from a team as a code owner October 28, 2024 13:51
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 28, 2024

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a minor comment about class / method visibility level in the test, but looks good. Thanks!

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

public class OkHttpGrpcSenderTest {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#nit: we omit public on test classes and test methods in this repo, since junit 5 doesn't require them to be public

Suggested change
public class OkHttpGrpcSenderTest {
class OkHttpGrpcSenderTest {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the code review😊

@jack-berg
jack-berg merged commit 740dd14 into open-telemetry:main Oct 29, 2024
@JiwonKKang
JiwonKKang deleted the grpc-retry branch October 29, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants