Skip to content

Add API to disable internal retry behavior #963

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

Merged
merged 3 commits into from
Jun 5, 2025

Conversation

Avery-Dunn
Copy link
Collaborator

Adds a public API to AbstractApplicationBase to disable internal retry behavior for HTTP requests, similar to what was done in MSAL Node and .NET:
AzureAD/microsoft-authentication-library-for-js#7603
AzureAD/microsoft-authentication-library-for-dotnet#5252

Internally, HttpHelper was given a new constructor more easily and cleanly use this new field and the new IRetryPolicy introduce in #960, and some minor refactoring was done to related classes.

ManagedIdentityTests received a new parameterized test which uses the API with several IRetryPolicy implementations.

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner June 4, 2025 00:31
*
* @return instance of the Builder on which method was called
*/
public T disableInternalRetries() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename it to disableMsalRetries. In MSAL.Net this is passed as a flag when passing HttpClientFactory. Would recommend to be consistent with that if possible. WithHttpClientFactory. The name of the flag is no longer valid in MSAL.Net but similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Avery-Dunn Avery-Dunn merged commit eb10360 into avdunn/retry-behavior Jun 5, 2025
3 checks passed
@Avery-Dunn Avery-Dunn deleted the avdunn/retry-behavior-disable branch June 5, 2025 15:34
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