azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

Prototype making DelayStrategy public

Open JoshLove-msft opened this issue 2 years ago • 1 comments

Attempts to unify the DelayStrategy into something that can be used in both LROs and custom Retry policies. For LROs, the delayHint is what, if anything, the user specified in the pollingInterval param of WaitForCompletion. For retry policy, the delayHint is null.

For LROs, the DelayStrategy will always be wrapped in the RetryAfterDelayStrategy. This is not the case for RetryPolicy. Reasoning is discussed in this comment.

JoshLove-msft avatar Dec 13 '22 23:12 JoshLove-msft

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Core

azure-sdk avatar Dec 13 '22 23:12 azure-sdk

Delay vs DelayStrategy

JoshLove-msft avatar Mar 14 '23 23:03 JoshLove-msft

@JoshLove-msft I assume we want to track this separately so I opened an issue for it https://github.com/Azure/azure-sdk-for-net/issues/35373

m-nash avatar Apr 05 '23 18:04 m-nash

All LRO strategies are currently wrapped with the RetryAfterStrategy which makes it so the Retry-After header is always applied and not overridable within a strategy passed to OperationPoller. Should users be able to override this for either LRO or retries?

@JoshLove-msft I've often wondered if the service has determine the best value to pass back. Some I've seen just return 10 (10s) and it seems rather random. Perhaps we don't make it incidentally easy to ignore it, but I wonder if the pipeline should at least make it possible if someone wrote their own retry policy to ignore it in case a better value works for their workload after their own investigation.

heaths avatar Apr 12 '23 20:04 heaths

@JoshLove-msft not sure if you noticed these. They didn't show up as fatal Checks errors, but looks like something broke inadvertently:

image

heaths avatar Apr 13 '23 17:04 heaths

@JoshLove-msft not sure if you noticed these. They didn't show up as fatal Checks errors, but looks like something broke inadvertently:

image

Hmm where are you seeing this?

JoshLove-msft avatar Apr 13 '23 19:04 JoshLove-msft

@JoshLove-msft in the Files tab, not the Checks.

heaths avatar Apr 13 '23 20:04 heaths

@JoshLove-msft in the Files tab, not the Checks.

Seems to not be an issue anymore.

JoshLove-msft avatar Apr 13 '23 20:04 JoshLove-msft

All LRO strategies are currently wrapped with the RetryAfterStrategy which makes it so the Retry-After header is always applied and not overridable within a strategy passed to OperationPoller. Should users be able to override this for either LRO or retries?

@JoshLove-msft I've often wondered if the service has determine the best value to pass back. Some I've seen just return 10 (10s) and it seems rather random. Perhaps we don't make it incidentally easy to ignore it, but I wonder if the pipeline should at least make it possible if someone wrote their own retry policy to ignore it in case a better value works for their workload after their own investigation.

We ended up not allowing users to use a value that is less than the service provided value. If we hear of legitimate use cases we can add this ability in the future.

JoshLove-msft avatar Apr 17 '23 18:04 JoshLove-msft

Once this is merged, will need to update DownloadSharedSource.ps1 in AutoRest to remove the deleted shared source files.

JoshLove-msft avatar Apr 20 '23 23:04 JoshLove-msft