-
Notifications
You must be signed in to change notification settings - Fork 5.1k
DAC - attempt retries and disable probe when ManagedIdentityCredential is selected in Env #52545
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
DAC - attempt retries and disable probe when ManagedIdentityCredential is selected in Env #52545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a feature to disable probe requests and enable retries when ManagedIdentityCredential is explicitly configured via environment variables. The changes modify the DefaultAzureCredential behavior to skip the initial probe phase and allow exponential backoff retries when the credential chain is specifically configured to use ManagedIdentityCredential.
Key changes:
- Modified factory methods to accept a probe control parameter
- Added environment variable detection to disable probing when ManagedIdentityCredential is selected
- Added comprehensive test coverage for the new behavior
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
DefaultAzureCredentialFactory.cs |
Modified CreateManagedIdentityCredential to accept probe control parameter and disable probing when called from environment variable configuration |
TestDefaultAzureCredentialFactory.cs |
Updated method signature to match base class changes |
MockDefaultAzureCredentialFactory.cs |
Updated method signature to match base class changes |
ImdsManagedIdentityProbeSourceTests.cs |
Added comprehensive test cases to verify probing is disabled and retries are enabled when ManagedIdentityCredential is configured via environment variables |
CHANGELOG.md |
Documented the new feature in the changelog |
sdk/identity/Azure.Identity/tests/ImdsManagedIdentityProbeSourceTests.cs
Outdated
Show resolved
Hide resolved
sdk/identity/Azure.Identity/tests/ImdsManagedIdentityProbeSourceTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.