feat(storage): adding more context to the custom should-retry method#13750
feat(storage): adding more context to the custom should-retry method#13750cpriti-os merged 6 commits intogoogleapis:mainfrom
Conversation
Summary of ChangesHello @raj-prince, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the flexibility of custom retry policies by introducing additional context to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances the retry mechanism by allowing the custom shouldRetry function to receive more context, namely the current attempt number and a unique invocation ID. This is a valuable addition for users who need more sophisticated retry logic. The implementation is backward-compatible, gracefully handling both the old and new function signatures. The changes are well-tested, including new unit tests for backward compatibility.
My review focuses on a few places where the new context (currentAttempt, invocationID) is not fully available, specifically in the context of streaming gRPC calls. I've suggested improvements to provide more accurate information to the user's retry function in these cases, or at least document the limitations. Overall, this is a solid feature addition.
2497b2e to
5656d82
Compare
3237f88 to
bd1d5dd
Compare
|
Can you check the failing kokoro test? |
cpriti-os
left a comment
There was a problem hiding this comment.
Mostly looks good, added some nits and clarifications.
aeaceda to
c544543
Compare
Description:
Test: