From 13eae9f69d5568211fb2a5448f2c21876825368b Mon Sep 17 00:00:00 2001 From: Shreyas-Microsoft Date: Tue, 19 May 2026 17:08:09 +0530 Subject: [PATCH 1/2] chore(tests): drop unused imports flagged on PR #242 Removes ten unused imports identified by github-code-quality on PR microsoft/Container-Migration-Solution-Accelerator#242: - test_cosmos_checkpoint_storage.py: drop `patch`, `pytest`, and the unused `cosmos_checkpoint_storage as ccs` alias. - test_groupchat_orchestrator_internals.py: drop `AgentResponseStream` from the multi-symbol import. - test_mermaid_internals.py: drop `json` and `pytest`. - test_migration_processor_extras.py: drop `patch` and `pytest`. - test_queue_service_internals.py: drop `pytest`. - test_shared_config.py: drop `pytest`. No behavioural change. All affected test files were re-run locally and still pass (15 backend-api + 213 processor tests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/backend-api/src/tests/sas/storage/test_shared_config.py | 2 -- .../libs/agent_framework/test_cosmos_checkpoint_storage.py | 5 +---- .../agent_framework/test_groupchat_orchestrator_internals.py | 1 - .../src/tests/unit/libs/mcp_server/test_mermaid_internals.py | 3 --- .../src/tests/unit/services/test_queue_service_internals.py | 2 -- .../src/tests/unit/steps/test_migration_processor_extras.py | 4 +--- 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/backend-api/src/tests/sas/storage/test_shared_config.py b/src/backend-api/src/tests/sas/storage/test_shared_config.py index e4f2d9af..fb33572a 100644 --- a/src/backend-api/src/tests/sas/storage/test_shared_config.py +++ b/src/backend-api/src/tests/sas/storage/test_shared_config.py @@ -1,7 +1,5 @@ """Tests for libs/sas/storage/shared_config.py.""" -import pytest - from libs.sas.storage import shared_config as shared_config_module from libs.sas.storage.shared_config import ( StorageConfig, diff --git a/src/processor/src/tests/unit/libs/agent_framework/test_cosmos_checkpoint_storage.py b/src/processor/src/tests/unit/libs/agent_framework/test_cosmos_checkpoint_storage.py index 241b1471..362cc9bd 100644 --- a/src/processor/src/tests/unit/libs/agent_framework/test_cosmos_checkpoint_storage.py +++ b/src/processor/src/tests/unit/libs/agent_framework/test_cosmos_checkpoint_storage.py @@ -2,11 +2,8 @@ # Licensed under the MIT License. import asyncio -from unittest.mock import AsyncMock, MagicMock, patch +from unittest.mock import AsyncMock, MagicMock -import pytest - -from libs.agent_framework import cosmos_checkpoint_storage as ccs from libs.agent_framework.cosmos_checkpoint_storage import ( CosmosCheckpointStorage, CosmosWorkflowCheckpoint, diff --git a/src/processor/src/tests/unit/libs/agent_framework/test_groupchat_orchestrator_internals.py b/src/processor/src/tests/unit/libs/agent_framework/test_groupchat_orchestrator_internals.py index a95d9623..4939049b 100644 --- a/src/processor/src/tests/unit/libs/agent_framework/test_groupchat_orchestrator_internals.py +++ b/src/processor/src/tests/unit/libs/agent_framework/test_groupchat_orchestrator_internals.py @@ -19,7 +19,6 @@ from libs.agent_framework.groupchat_orchestrator import ( AgentResponse, - AgentResponseStream, GroupChatOrchestrator, OrchestrationResult, ) diff --git a/src/processor/src/tests/unit/libs/mcp_server/test_mermaid_internals.py b/src/processor/src/tests/unit/libs/mcp_server/test_mermaid_internals.py index 7d72fccc..cf83e849 100644 --- a/src/processor/src/tests/unit/libs/mcp_server/test_mermaid_internals.py +++ b/src/processor/src/tests/unit/libs/mcp_server/test_mermaid_internals.py @@ -5,11 +5,8 @@ from __future__ import annotations -import json from unittest.mock import MagicMock, patch -import pytest - from libs.mcp_server.mermaid import mcp_mermaid as mod from libs.mcp_server.mermaid.mcp_mermaid import ( _balance_check, diff --git a/src/processor/src/tests/unit/services/test_queue_service_internals.py b/src/processor/src/tests/unit/services/test_queue_service_internals.py index 565a6754..47a8d701 100644 --- a/src/processor/src/tests/unit/services/test_queue_service_internals.py +++ b/src/processor/src/tests/unit/services/test_queue_service_internals.py @@ -10,8 +10,6 @@ from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch -import pytest - from services.queue_service import QueueMigrationService, QueueServiceConfig from steps.analysis.models.step_param import Analysis_TaskParam diff --git a/src/processor/src/tests/unit/steps/test_migration_processor_extras.py b/src/processor/src/tests/unit/steps/test_migration_processor_extras.py index 0ac9a5ea..8dbb4216 100644 --- a/src/processor/src/tests/unit/steps/test_migration_processor_extras.py +++ b/src/processor/src/tests/unit/steps/test_migration_processor_extras.py @@ -4,9 +4,7 @@ from __future__ import annotations import asyncio -from unittest.mock import MagicMock, patch - -import pytest +from unittest.mock import MagicMock from steps.migration_processor import ( MigrationProcessor, From 9dab2e4b4fcfffd54665bc94073da0475671f697 Mon Sep 17 00:00:00 2001 From: Shreyas-Microsoft Date: Tue, 19 May 2026 17:08:10 +0530 Subject: [PATCH 2/2] ci(test.yml): trigger on uv.lock changes (PR #242 feedback) Adds `src/backend-api/uv.lock` and `src/processor/uv.lock` to the `paths` filter for both `push` and `pull_request` triggers so that dependency lockfile updates (e.g. Dependabot bumps) re-run the test workflow. Addresses the copilot-pull-request-reviewer comment on PR microsoft/Container-Migration-Solution-Accelerator#242. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d373c481..998b0447 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,9 +8,11 @@ on: paths: - 'src/backend-api/**/*.py' - 'src/backend-api/pyproject.toml' + - 'src/backend-api/uv.lock' - 'src/backend-api/pytest.ini' - 'src/processor/**/*.py' - 'src/processor/pyproject.toml' + - 'src/processor/uv.lock' - '.github/workflows/test.yml' pull_request: types: @@ -24,9 +26,11 @@ on: paths: - 'src/backend-api/**/*.py' - 'src/backend-api/pyproject.toml' + - 'src/backend-api/uv.lock' - 'src/backend-api/pytest.ini' - 'src/processor/**/*.py' - 'src/processor/pyproject.toml' + - 'src/processor/uv.lock' - '.github/workflows/test.yml' permissions: