[App Config] Throttling retry policy update - no retrying forever#16376
[App Config] Throttling retry policy update - no retrying forever#16376HarshaNalluru merged 15 commits intoAzure:mainfrom
Conversation
… harshan/app-config/issue/16366
| "author": "Microsoft Corporation", | ||
| "description": "An isomorphic client library for the Azure App Configuration service.", | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", |
There was a problem hiding this comment.
Why didnt the automation that increments version number do this?
There was a problem hiding this comment.
I couldn't find it yesterday.
There was a problem hiding this comment.
I was filtering with App Configuration label and it turned out there was no label on the automated PR #16269.
Asked @praveenkuttappan in the teams' channel
… harshan/app-config/issue/16366
…arshaNalluru/azure-sdk-for-js into harshan/app-config/issue/16366
sdk/appconfiguration/app-configuration/review/app-configuration.api.md
Outdated
Show resolved
Hide resolved
Why is
I feel like this has been discussed, but is there an issue tracking honoring the retry count across retry policies (or consolidating retry policies into a single one that can keep track of the retry count)? |
| if (delayInMs == null) { | ||
| if ( | ||
| delayInMs == null || | ||
| (this.retryOptions.maxRetryDelayInMs && delayInMs > this.retryOptions.maxRetryDelayInMs) |
There was a problem hiding this comment.
should we just delay(maxRetryDelayInMs) for the case of (this.retryOptions.maxRetryDelayInMs && delayInMs > this.retryOptions.maxRetryDelayInMs)?
retryDelayInMs is not for the throttlingRetryPolicy since we get the delay in ms from the error response from the service. Eventually, we'll unify the retry policies in core.
This current PR only cares about the throttling policy and is meant to unblock the customer.
|
…arshaNalluru/azure-sdk-for-js into harshan/app-config/issue/16366
…elayInMs && delayInMs > this.retryOptions.maxRetryDelayInMs)
| */ | ||
| export function throttlingRetryPolicy(): RequestPolicyFactory { | ||
| export function throttlingRetryPolicy( | ||
| retryOptions?: Pick<RetryOptions, "maxRetries" | "maxRetryDelayInMs"> |
There was a problem hiding this comment.
update the parameter type to use the local one?
| constructor( | ||
| nextPolicy: RequestPolicy, | ||
| options: RequestPolicyOptions, | ||
| private retryOptions: Pick<RetryOptions, "maxRetries" | "maxRetryDelayInMs"> = {} |
There was a problem hiding this comment.
update the parameter type to use the local one?
| } | ||
|
|
||
| if ( | ||
| this.retryOptions.maxRetryDelayInMs && |
There was a problem hiding this comment.
can we set this to the default in the constructor default option value? Otherwise the delay can go unbounded.
private retryOptions: Pick<RetryOptions, "maxRetries" | "maxRetryDelayInMs"> = {
maxRetryDelayInMs: 90*1000 // is this constant defined somewhere?
maxRetries: DEFAULT_CLIENT_RETRY_COUNT
}There was a problem hiding this comment.
This is fine for maxRetries, will add that.
I don't want to define maxRetryDelayInMs since different services may have different values.
For example, with the observations from app-config, I have seen values anywhere between 20ms and 300000ms.
There was a problem hiding this comment.
For the throttlign policy case, if the error from the service is with the delay, then we use it for delay and throw directly otherwise. I don't think there is a case of unboundedness.
maxRetryDelayInMs should only be provided by the user according to me.
There was a problem hiding this comment.
Sounds fair. Please update the ref doc for maxRetryDelayInMs to remove the mentioning of default value.
jeremymeng
left a comment
There was a problem hiding this comment.
one comment about the ref doc. otherwise looking good!
…6376) * app-config throttlign retry policy fix - no retrying forever * typo * update versions * Add changelog * Update sdk/appconfiguration/app-configuration/CHANGELOG.md * Update sdk/appconfiguration/app-configuration/CHANGELOG.md * Redeclare RetryOptions * API Report * delay(maxRetryDelayInMs) for the case of (this.retryOptions.maxRetryDelayInMs && delayInMs > this.retryOptions.maxRetryDelayInMs) * address feedback * remove 90 seconds default
Issue #16366
In this PR
Fixes #16366