Skip to content

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Jul 9, 2024

Follow up of #3016

On bigtable and spanner:
image
image

Thanks @blakeli0 and @lqiu96 for the directions.

@diegomarquezp diegomarquezp added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 9, 2024
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jul 9, 2024
@diegomarquezp diegomarquezp marked this pull request as ready for review July 9, 2024 20:16
@diegomarquezp diegomarquezp requested a review from a team as a code owner July 9, 2024 20:16
@diegomarquezp diegomarquezp changed the title chore: demo of moving the overload logic from BaseApiTracer to ApiTracer chore: move the attemptFailed overload logic from BaseApiTracer to ApiTracer Jul 9, 2024
@diegomarquezp diegomarquezp changed the title chore: move the attemptFailed overload logic from BaseApiTracer to ApiTracer chore: move the attemptFailed logic from BaseApiTracer to ApiTracer Jul 9, 2024
@@ -121,7 +123,10 @@ default Scope inScope() {
* @param error the transient error that caused the attempt to fail.
* @param delay the amount of time to wait before the next attempt will start.
*/
default void attemptFailedDuration(Throwable error, java.time.Duration delay) {};
default void attemptFailedDuration(Throwable error, java.time.Duration delay) {
// defaults to do the same as attemptFailed(Throwable, org.threeten.bp.Duration)
Copy link
Member

Choose a reason for hiding this comment

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

nit: Can you add a blurb to reflect the why?

i.e. Customers may have older/legacy code that directly implements ApiTracer's attemptFailed() method and their overriden logic should be invoked in gax.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, thank you. I added a similar blurb in the body comment.

Copy link

sonarqubecloud bot commented Jul 9, 2024

Copy link

sonarqubecloud bot commented Jul 9, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@diegomarquezp diegomarquezp requested a review from lqiu96 July 9, 2024 20:46
@diegomarquezp diegomarquezp merged commit b738de5 into main Jul 9, 2024
@diegomarquezp diegomarquezp deleted the demo-apitracer-overload branch July 9, 2024 20:56
@blakeli0 blakeli0 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants