feat: Use ManagedIdentityCredential fir Prod Workloads and DefaultAzureCredential for dev#236
Merged
Vinay-Microsoft merged 1 commit intomainfrom Jul 31, 2025
Merged
feat: Use ManagedIdentityCredential fir Prod Workloads and DefaultAzureCredential for dev#236Vinay-Microsoft merged 1 commit intomainfrom
Vinay-Microsoft merged 1 commit intomainfrom
Conversation
#235) * commiting the new changes * removing Credntials * app contect py file change * PR Review Changes * Test workflow changes * Test work flow build failed * test work flow failed fixes * test workflow final fixes * Pylint Fixes
Prajwal-Microsoft
approved these changes
Jul 31, 2025
Vinay-Microsoft
approved these changes
Jul 31, 2025
|
🎉 This PR is included in version 1.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces significant changes to improve Azure credential handling, streamline environment configuration, and enhance test coverage. The key updates include replacing
DefaultAzureCredentialwith a custom utility to dynamically select credentials based on the environment, adding new test configurations and fixtures, and modifying the infrastructure to include anAPP_ENVvariable for environment-specific behavior.Azure Credential Management:
get_azure_credentialandget_azure_credential_asyncmethods inhelpers/azure_credential_utils.pyto dynamically selectDefaultAzureCredentialfor development andManagedIdentityCredentialfor production.DefaultAzureCredentialwithget_azure_credentialacross multiple files, includingapplication_context.py,app_configuration.py,azure_openai.py,content_understanding.py,storage_blob.py,pipeline_queue_helper.py,remote_module_loader.py, andmain.py. [1] [2] [3] [4] [5] [6] [7] [8]Environment Configuration:
APP_ENVvariable with a default value ofprodin theinfra/main.bicepfile for multiple modules to enable environment-specific configurations. [1] [2] [3] [4]Testing Enhancements:
test_azure_credential_utils.pyto validate the behavior ofget_azure_credentialandget_azure_credential_asyncin both development and production environments.conftest.pyto mock Azure credentials and streamline test setup. [1] [2]pytest.inito include strict markers, disable warnings, and define test file patterns.test_storage_blob.pyto mockget_azure_credentialinstead ofDefaultAzureCredential.Code Cleanup:
DefaultAzureCredentialwhere no longer needed and replaced them with the new utility. [1] [2] [3]These changes collectively improve the flexibility, maintainability, and testability of the codebase while ensuring proper credential handling across different environments.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information