-
Notifications
You must be signed in to change notification settings - Fork 119
feat: wrap non-retryable RPCs in retry machinery #1328
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1328 +/- ##
============================================
+ Coverage 80.56% 81.38% +0.82%
- Complexity 1332 1340 +8
============================================
Files 210 210
Lines 5686 5690 +4
Branches 519 521 +2
============================================
+ Hits 4581 4631 +50
+ Misses 894 850 -44
+ Partials 211 209 -2
Continue to review full report at Codecov.
|
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.
LGTM
going to add a |
Never mind, this code is actually covered by the TimeoutTest file, that's just not in the same package and thus doesn't cover. |
@igorbernstein2 what are the implications of this change on ServerStreaming callables? Would making all callables wrapped in in the Retry machinery be bad for ServerStreaming? |
I spoke with Igor offline and he wants to look into how this might affect tracing data for non-retryable RPCs (b.c now the RPC goes through the retry machinery for the single attempt made). He will follow up here with any findings. He did say this shouldn't be a problem for server streaming RPCs, though. |
e705b92
to
5e6af5a
Compare
5d0aa59
to
18a7bce
Compare
I've added more test classes to verify context & tracer behavior with non-retryable RPCs (and acquire proper code coverage). |
@igorbernstein2 have you had a chance to verify things locally or see if the tests I added were sufficient WRT Tracing? I'd like to merge this so it can ship with the next release. Thank you! |
I'm going to submit this PR on Monday. |
RPCs that are configured at the client-level to be non-retryable still get wrapped in the retry machinery to ensure features like #1238 that depend on call-time context options still work for non-retryable methods.
In order to ensure that the proper timeout is used by default, the call settings are overridden with
setSimpleTimeoutNoRetries
.There are already tests that verify the proper timeout is used for non-retryable RPCs, for example:
gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/TimeoutTest.java
Line 87 in 3fe1db9
Fixes #1327