Skip to content

fix: fixed CodQL issues for Container Migration.#196

Open
VishalS-Microsoft wants to merge 2 commits intodevfrom
psl-codequality-cm
Open

fix: fixed CodQL issues for Container Migration.#196
VishalS-Microsoft wants to merge 2 commits intodevfrom
psl-codequality-cm

Conversation

@VishalS-Microsoft
Copy link
Copy Markdown

Purpose

This pull request includes a variety of small cleanups and improvements across both backend and frontend code. The main themes are dependency injection simplification, minor bug fixes, code cleanup, and removal of unused or redundant code. These changes improve maintainability and code clarity.

Backend Improvements and Cleanups:

  • Simplified dependency injection for IDataService by passing the class directly instead of a lambda in both the application context and tests. [1] [2]
  • Fixed a missing self parameter in the abstract execute method of SKLogicBase, and replaced ... with pass in method stubs for clarity and correctness. [1] [2] [3]
  • Removed unused imports and cleaned up import statements in several backend modules for better readability. [1] [2] [3]
  • Improved error handling comments and clarified pass statements for better maintainability, especially in JSON parsing and process duration calculation. [1] [2]
  • Used pass instead of ... in FastAPI protocol method stubs for better type checking.

Frontend Bug Fixes and UI Cleanups:

  • Fixed error grouping in renderErrorContent by ensuring files with error_count > 0 are included, improving error display accuracy.
  • Simplified progress calculation in ProgressModal by removing unnecessary migration error check.
  • Removed unused or redundant imports and variables across multiple React components and utility files, reducing bundle size and improving code clarity. [1] [2] [3] [4] [5] [6]
  • Cleaned up unused functions and logic in batch history and upload button components, streamlining the codebase. [1] [2] [3] [4] [5]
  • Removed unnecessary checks and unused variables in frontend code, such as the referer header and warning rendering logic. [1] [2] [3]

General Code Quality Improvements:

  • Consistently replaced ... with pass in Python abstract and protocol methods for better readability and type checking. [1] [2] [3]
  • Minor formatting and style fixes, such as adding missing semicolons and adjusting object initializations.

These changes collectively improve code maintainability, readability, and correctness across the project.

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

  • ...

Other Information

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
application.py34340%1–2, 4–11, 16–17, 20–21, 24, 30–31, 33–34, 36, 44, 50, 52, 60–62, 65, 74, 81–82, 84, 91, 139–140
libs/base
   SKLogicBase.py46460%1–2, 4–5, 14–15, 18, 21–24, 28, 35–36, 38–40, 42–43, 56–57, 59–60, 64–65, 69, 71, 76, 78, 82, 84–85, 87–88, 95, 97–98, 105, 107–108, 114, 116–120
   fastapi_protocol.py10100%4, 6–7, 10, 16, 19–20, 23, 36–37
libs/services
   interfaces.py23673%16, 21, 32, 37, 48, 53
routers
   router_files.py59590%1–2, 4, 11, 14–23, 25, 32–33, 35, 45–46, 51–52, 54–56, 58–59, 61–63, 65–66, 68–70, 72, 74–77, 79–80, 86, 90, 97–98, 100, 104–106, 108–109, 113, 119–124
routers/models
   files.py20575%10–11, 19, 24–25
TOTAL265423949% 

Tests Skipped Failures Errors Time
44 0 💤 0 ❌ 0 🔥 12.581s ⏱️

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.

1 participant