fix: fixed CodQL issues for Container Migration.#210
Merged
Roopan-Microsoft merged 4 commits intodevfrom May 7, 2026
Merged
Conversation
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to clean up and harden the container-migration codebase by removing dead code, replacing silent exception swallowing with debug logging, and simplifying a handful of frontend/backend typing and DI paths.
Changes:
- Replaced several bare
passexception handlers with debug logging across processor and backend helpers. - Simplified backend DI/type-hint code and removed unused code/imports in multiple frontend pages/components.
- Adjusted frontend status/progress rendering and config/bootstrap logic.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/processor/src/utils/agent_telemetry.py |
Removes commented-out code, adds explicit None return, and logs previously swallowed exceptions. |
src/processor/src/tests/conftest.py |
Clarifies the intentional sitecustomize side-effect import for tests. |
src/processor/src/steps/migration_processor.py |
Replaces silent exception swallowing with debug logging and adds an explicit trailing return. |
src/processor/src/services/queue_service.py |
Adds debug logging around best-effort shutdown/cancellation paths. |
src/processor/src/services/control_api.py |
Adds debug logging during control API shutdown cleanup. |
src/processor/src/libs/reporting/migration_report_generator.py |
Logs file-size lookup failures instead of swallowing them. |
src/processor/src/libs/mcp_server/mermaid/mcp_mermaid.py |
Documents why non-JSON Mermaid CLI output is ignored. |
src/processor/src/libs/mcp_server/datetime/mcp_datetime.py |
Removes unreachable fallback returns in error paths. |
src/processor/src/libs/agent_framework/qdrant_memory_store.py |
Logs collection-delete failures during close. |
src/processor/src/libs/agent_framework/azure_openai_response_retry.py |
Logs response-stream close failures. |
src/processor/src/libs/agent_framework/agent_framework_helper.py |
Replaces overload stub ellipses with pass. |
src/frontend/vite.config.js |
Removes an unused path import. |
src/frontend/src/pages/processPage.tsx |
Removes unused imports/state from the process page. |
src/frontend/src/pages/modernizationPage.tsx |
Cleans up state/helpers and changes summary/progress rendering logic. |
src/frontend/src/pages/landingPage.tsx |
Removes unused UI code and changes start-translation navigation handling. |
src/frontend/src/pages/batchView.tsx |
Removes unused warning/content helpers and slightly simplifies summary branching. |
src/frontend/src/msal-auth/apiHeaders.ts |
Removes an unused MSAL import. |
src/frontend/src/main.jsx |
Tweaks config bootstrap to prefer loaded config over an unconditional default. |
src/frontend/src/components/uploadButton.tsx |
Removes unused imports/state/helper code from upload UI. |
src/frontend/src/components/bottomBar.tsx |
Removes an unused React hook import. |
src/frontend/src/components/batchHistoryPanel.tsx |
Cleans up formatting and removes unused batch categorization code. |
src/frontend/src/commonComponents/ProgressModal/progressModal.tsx |
Adjusts completion-progress calculation logic. |
src/frontend/src/api/utils.tsx |
Tightens error-file filtering to explicit positive counts. |
src/frontend/frontend_server.py |
Removes unused response/import variables from the frontend server. |
src/backend-api/src/tests/application/test_dependency_injection.py |
Updates DI test registration to use the class directly. |
src/backend-api/src/app/libs/base/SKLogicBase.py |
Fixes execute signature and replaces overload ellipses with pass. |
src/backend-api/src/app/libs/base/fastapi_protocol.py |
Gives the protocol’s include_router stub an explicit body. |
src/backend-api/src/app/application.py |
Simplifies singleton registration for InMemoryDataService. |
scripts/validate_bicep_params.py |
Clarifies the JSON parse fallback comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
Roopan-Microsoft
approved these changes
May 7, 2026
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 includes a variety of improvements and refactors across both backend and frontend codebases, primarily focused on code cleanup, dependency injection simplification, and UI logic streamlining. The changes remove unused code, clarify error handling, and standardize service registration. There are also minor bug fixes and improvements to error/warning rendering and file processing logic in the frontend.
Backend Improvements
InMemoryDataServiceby passing the class directly instead of a lambda in bothapplication.pyand its corresponding test, ensuring consistent DI behavior. [1] [2]executeinSKLogicBaseto includeself, and replaced placeholder ellipses withpassin overloads forexecute_thread, clarifying abstract method expectations. [1] [2] [3]include_routerinFastAPIWithContextfor better type checking, and clarified comments in JSON parsing error handling invalidate_bicep_params.py. [1] [2]Frontend Improvements
batchView.tsx,uploadButton.tsx, andlandingPage.tsx, streamlining file selection, warning rendering, and upload state handling. [1] [2] [3] [4] [5] [6] [7]renderErrorContentto check for error count greater than zero, and adjusted progress modal logic to show 100% on completion regardless of error state. [1] [2]batchHistoryPanel.tsx. [1] [2]main.jsxto avoid always usingdefaultConfigand instead use the loaded config if available.modernizationPage.tsx.These changes collectively enhance code clarity, maintainability, and reliability across the project.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information