Skip to content

Conversation

@Vamshi-Microsoft
Copy link
Contributor

Purpose

This pull request refactors the codebase to consistently use the asynchronous version of the get_azure_credential function (get_azure_credential_async) across multiple modules. This change ensures compatibility with asynchronous workflows and improves consistency in how Azure credentials are retrieved.

Updates to Azure credential handling:

  • Replaced get_azure_credential with get_azure_credential_async in the AIProjectClient initialization within async def init_ai_foundry_client() in src/app.py.
  • Reverted to get_azure_credential from get_azure_credential_async in async def fetch_azure_search_content() in src/app.py, likely due to specific synchronous requirements in that context.

Updates to agent factories:

  • Updated imports in src/backend/api/agent/browse_agent_factory.py, src/backend/api/agent/section_agent_factory.py, and src/backend/api/agent/template_agent_factory.py to use get_azure_credential_async. [1] [2] [3]
  • Modified the async def create_or_get_agent(cls) method in all three agent factory modules to use await get_azure_credential_async() for initializing AIProjectClient. [1] [2] [3]

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • I have built and tested the code locally and in a deployed app
  • For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • This is a change for all users of this app. No code or asset is specific to my use case or my organization.

Other Information

@Vamshi-Microsoft Vamshi-Microsoft changed the title refractor: Changed Async and Sync Azure credential retrieval Refactor: Changed Async and Sync Azure credential retrieval Jul 31, 2025
@Vamshi-Microsoft Vamshi-Microsoft changed the title Refactor: Changed Async and Sync Azure credential retrieval refactor: Changed Async and Sync Azure credential retrieval Jul 31, 2025
@Prajwal-Microsoft Prajwal-Microsoft merged commit 61e12a7 into dev Jul 31, 2025
4 of 6 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants