Closed karolz-ms closed 1 week ago
cc @martincostello for polly comment
For the behaviour you're after (don't exceed this amount of time in total) you'd typically add a timeout policy to the resilience pipeline. Then the cancellation token for that would be passed from the timeout policy to the retry one, and it would observe it and terminate the retries when it's signalled.
Thanks @martincostello I will keep this in mind for the next time when I am working in this part of the codebase.
Description
Turns out that we did not wait long enough for the Container graceful stop to occur during restart sequence. This change tweaks the timeout used there.
Honestly I am not exactly sure how Polly calculates the exponential delay periods. Mathematically the original retry strategy settings should have been sufficient, but in reality we have been waiting too short. Polly also lacks the equivalent of
MaxElapsedTime
present in other retry frameworks, so I have verified experimentally that the current settings give desired max retry time.Fixes #5972
Checklist
<remarks />
and<code />
elements on your triple slash comments?Does the change require an update in our Aspire docs?
breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow