chore: cleanup usage of runWithRetries#1017
chore: cleanup usage of runWithRetries#1017BenWhitehead merged 3 commits intogoogleapis:masterfrom BenWhitehead:StorageImpl-cleanup
Conversation
BenWhitehead
commented
Sep 14, 2021
- Cleanup and deduplicate error handling/exception translation logic
- Condense all callables to lambdas
* Cleanup and deduplicate error handling/exception translation logic * Condense all callables to lambdas
tritone
left a comment
There was a problem hiding this comment.
Love how much boilerplate this approach allows us to remove! Since it's a bit complicated as far as logic, I'd like to get a review from the java folks on the team as well (@JesseLovelace / @frankyn ).
Also, can you discuss how you tested this? I'm assuming that you used the conformance tests draft to guarantee that you are avoiding regressions.
google-cloud-storage/src/main/java/com/google/cloud/storage/Retrying.java
Show resolved
Hide resolved
frankyn
left a comment
There was a problem hiding this comment.
Refactor LGTM, thanks for adding the additional javadoc.
There are more runWithRetries uses, could you clarify scope? It would be awesome if you could file a tracking issue to point back to as you continue refactoring.
|
Related to #1024 |
|
I created #1024 to track cleaning up the remaining usages |
|
Related to the question of testing @tritone, this is a mainly syntactic refactor because we now have access to lambdas with java 8. Secondarily, because the lambdas are more terse, I also did the extra step of creating Retrying.run to remove the duplicated error handling, retry settings and api clock resolution that was everywhere. |