Skip to content

fix: updated the testcases and resolve the conflict - #1105

Merged
Roopan-Microsoft merged 2 commits into
devfrom
psl-v5pipelinefix
Jul 20, 2026
Merged

fix: updated the testcases and resolve the conflict#1105
Roopan-Microsoft merged 2 commits into
devfrom
psl-v5pipelinefix

Conversation

@Dhruvkumar-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request primarily removes the custom deployment configuration (azure_custom.yaml) in favor of a single unified azure.yaml file, streamlining deployment and configuration management. It also updates CI/CD pipeline triggers to reflect this change, cleans up related documentation, and adds new unit tests for the agent registry. Several minor test improvements and clarifications are also included.

Configuration and Pipeline Simplification:

  • Removed azure_custom.yaml and migrated all configuration into a single azure.yaml, enabling a unified deployment process and eliminating the need to swap config files for local changes. [1] [2]
  • Updated all Azure DevOps and GitHub Actions pipeline triggers to stop referencing azure_custom.yaml, ensuring pipelines only respond to changes in the main configuration. (.azdo/pipelines/azure-dev.yml, .github/workflows/deploy-waf.yml, .github/workflows/docker-build-and-push.yml) [1] [2] [3] [4]

Documentation Updates:

  • Removed the "Advanced: Deploy Local Changes" section from DeploymentGuide.md and all instructions about swapping configuration files, reflecting the new unified config approach.
  • Updated bash script invocation paths and section numbering in DeploymentGuide.md for accuracy and consistency. [1] [2]

Testing Improvements:

  • Added comprehensive unit tests for the AgentRegistry singleton, covering registration, cleanup, and error handling.
  • Improved and clarified test mocks and behaviors in backend tests, including more accurate content concatenation logic and dependency mocking. [1] [2] [3] [4]

Test Logic Correction:

  • Updated test_team_utils.py to verify that team configuration mutations are performed in place, reflecting the actual implementation. [1] [2]

Minor Code Cleanup:

  • Removed an unnecessary blank line in plan_review_helpers.py.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissCoverMissing
orchestration
   plan_review_helpers.py1293275%304, 308, 310–311, 317, 321–324, 326–327, 330, 332–339, 341–342, 344–345, 347–352, 525–526
TOTAL382355185% 

Tests Skipped Failures Errors Time
834 0 💤 0 ❌ 0 🔥 10.090s ⏱️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request streamlines deployment configuration by removing the custom azure_custom.yaml/main_custom.bicep path in favor of a single azure.yaml, updates CI/CD triggers and documentation to match, and adds/adjusts a sizable set of backend unit tests (including new coverage for MCP config, agent registry, router endpoints, and orchestration connection state).

Changes:

  • Removed custom deployment configuration (azure_custom.yaml, infra/main_custom.bicep) and updated pipeline triggers to watch only azure.yaml.
  • Updated deployment documentation to reflect the unified config and corrected script paths/section numbering.
  • Added and updated backend unit tests across orchestration, config, services, tools, and API router modules; refined test mocking for external dependencies.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/tests/backend/tools/test_clarification_tool.py New unit tests for clarification tool answer store and fallback behavior.
src/tests/backend/services/test_team_service.py Expanded tests for model extraction/validation and search index validation helpers.
src/tests/backend/orchestration/test_user_interaction_agent.py New unit test for creating the user interaction agent with MCP tool wiring.
src/tests/backend/orchestration/test_orchestration_manager.py Updated mocks/expectations for team IDs and orchestration builder args.
src/tests/backend/orchestration/test_connection_config.py New tests for orchestration/connection/team config singletons and helpers.
src/tests/backend/conftest.py Enhanced framework mocking and SDK patching for improved test collection.
src/tests/backend/config/test_mcp_config.py New tests for MCP config env parsing, headers, and knowledge base URL building.
src/tests/backend/config/test_agent_registry.py New tests for AgentRegistry lifecycle tracking and cleanup behavior.
src/tests/backend/common/utils/test_team_utils.py Adjusted test expectations to match in-place team mutation behavior.
src/tests/backend/common/utils/test_agent_utils.py Improved module-level mocking imports and Azure stubbing setup.
src/tests/backend/callbacks/test_response_handlers.py Updated mocking and expectations for markdown normalization and content concatenation.
src/tests/backend/api/test_router.py New router tests with robust import isolation and collaborator patching.
src/backend/orchestration/plan_review_helpers.py Minor whitespace cleanup.
infra/main_custom.bicep Removed custom Bicep entrypoint for local-change deployment.
docs/DeploymentGuide.md Updated script paths/section numbering; removed advanced custom-config swapping section.
azure.yaml Enabled template metadata (uncommented) for unified configuration.
azure_custom.yaml Removed custom azd configuration file.
.github/workflows/docker-build-and-push.yml Updated workflow triggers to stop referencing removed config.
.github/workflows/deploy-waf.yml Updated workflow triggers to stop referencing removed config.
.azdo/pipelines/azure-dev.yml Updated pipeline triggers to stop referencing removed config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tests/backend/conftest.py Outdated
Comment on lines 110 to 115
if importlib.util.find_spec('agent_framework') is not None:
# Real agent_framework (and its companion distributions) are installed;
# use them directly instead of substituting stubs.
return

if 'agent_framework' not in sys.modules:
Comment thread src/tests/backend/conftest.py Outdated
@@ -119,40 +188,56 @@ def _decorator(func):

if 'agent_framework_orchestrations' not in sys.modules:
Comment thread src/tests/backend/conftest.py Outdated
_install_lazy_attrs(mock_af_orch_mag)
sys.modules['agent_framework_orchestrations._magentic'] = mock_af_orch_mag

if 'agent_framework_azure_ai' not in sys.modules:
Comment thread src/tests/backend/conftest.py Outdated
mock_af_ai.AzureAIClient = _stub_class('AzureAIClient')
sys.modules['agent_framework_azure_ai'] = mock_af_ai

if 'agent_framework_foundry' not in sys.modules:
Comment thread src/tests/backend/conftest.py Outdated
mock_af_foundry.FoundryChatClient = _stub_class('FoundryChatClient')
sys.modules['agent_framework_foundry'] = mock_af_foundry

if 'agent_framework_openai' not in sys.modules:
Comment thread src/tests/backend/orchestration/test_connection_config.py Outdated
@Roopan-Microsoft
Roopan-Microsoft merged commit fc56d28 into dev Jul 20, 2026
8 checks passed
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.

3 participants