Skip to content

Conversation

@Avery-Dunn
Copy link
Contributor

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
Contributor

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
Contributor 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.

5 participants