-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(generator): separate page for retry policy overrides #11950
feat(generator): separate page for retry policy overrides #11950
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #11950 +/- ##
==========================================
- Coverage 93.67% 93.66% -0.01%
==========================================
Files 1838 1838
Lines 166749 166763 +14
==========================================
+ Hits 156195 156203 +8
- Misses 10554 10560 +6
☔ View full report in Codecov by Sentry. |
void GenerateOverrideRetryPoliciesPage( | ||
std::ostream& os, std::map<std::string, std::string> const& variables) { | ||
auto constexpr kText = R"""(/*! | ||
@page $library$-override-retry Override Retry, Backof, and Idempotency Policies |
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.
s/Backof/Backoff/
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.
Done
You can provide your own class for this option. The library also provides two | ||
built-in policies: | ||
|
||
- `*LimitedErrorCountRetryPolicy`: stops retrying after an specified number |
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.
s/an specified/a specified/
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.
Done
|
||
- `*LimitedErrorCountRetryPolicy`: stops retrying after an specified number | ||
of transient errors. | ||
- `*LimitedTimeRetryPolicy`: stops retrying after an specified time. |
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.
s/an specified/a specified/
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.
Done
Note that a library may have more than one version of these classes. Their name | ||
matches the `*Client` and `*Connection` object they are intended to be used |
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.
s/Their name matches/Their names match/
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.
Done
backoff. The current backoff is doubled after each failure, but never exceeds | ||
(or is "truncated") if it reaches a prescribed maximum. | ||
|
||
@section $library$-override-retry-idempotency-policy Controlling the which operations are retryable |
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.
s/the which/which/
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.
Done
GenerateOverrideRetryPoliciesPage(os, vars); | ||
auto const actual = std::move(os).str(); | ||
EXPECT_THAT(actual, AllOf(HasSubstr(R"""( | ||
@page test-override-retry Override Retry, Backof, and Idempotency Policies |
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.
s/Backof/Backoff/
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.
Done
PTAL |
Part of the work for #10157
This change is