Skip to content

Reworked retry policy functionality & Created IMDS retry policy #5231

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

Open
wants to merge 68 commits into
base: main
Choose a base branch
from

Conversation

Robbie-Microsoft
Copy link
Contributor

@Robbie-Microsoft Robbie-Microsoft commented Apr 11, 2025

.NET's retry policy functionality now aligns with MSAL-Node. This PR was already implemented in MSAL-Node, here.

There are now two retry strategies:
LinearRetryStrategy and ExponentialRetryStrategy

There are now two retry policies, which use the retry strategies:
ImdsRetryPolicy and DefaultRetryPolicy (both ESTS and non-IMDS Managed Identity HttpManagers use DefaultRetryPolicy)

The unit tests in this PR are ported from the MSAL-Node PR:
All retry policy unit tests run "100 times faster" by overriding certain variables; Retry policy tests are no longer "expensive".

@Robbie-Microsoft Robbie-Microsoft marked this pull request as ready for review April 21, 2025 22:04
@Robbie-Microsoft Robbie-Microsoft requested a review from a team as a code owner April 21, 2025 22:04
@Robbie-Microsoft Robbie-Microsoft marked this pull request as ready for review May 2, 2025 23:38
Robbie-Microsoft and others added 2 commits June 2, 2025 12:12
… tests (#5308)

* Created a prod and test retry policy factories, and adjusted unit tests

* Retry Policy tests no longer rely on NumRetries static variable from individual retry policies (#5311)

Replaced NumRetries static variable tests with QueueSize tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants