Skip to content

fix: codeQL issues#362

Open
Priyanka-Microsoft wants to merge 1 commit intodevfrom
psl-cd-codeQl-fix
Open

fix: codeQL issues#362
Priyanka-Microsoft wants to merge 1 commit intodevfrom
psl-cd-codeQl-fix

Conversation

@Priyanka-Microsoft
Copy link
Collaborator

Purpose

  • ...
    This pull request includes several minor code cleanups and improvements across both backend and frontend code, as well as test files. The main changes involve removing unused state variables, improving code clarity, and ensuring proper superclass initialization in test page objects.

Frontend state management cleanup:

  • Removed the unused selectedFileContent state and its associated setter from batchView.tsx, and stopped setting it when fetching file data. (src/frontend/src/pages/batchView.tsx) [1] [2]
  • Removed the unused progressPercentage state from modernizationPage.tsx and updated the loading timeout logic to no longer depend on it. (src/frontend/src/pages/modernizationPage.tsx) [1] [2]

Backend and test improvements:

  • In comms_manager.py, explicitly returns None when no matching agent is found, clarifying intent. (src/backend/sql_agents/helpers/comms_manager.py)
  • Added a clarifying comment in the convert script test to indicate an expected exception and verify cleanup logic. (src/tests/backend/sql_agents/convert_script_test.py)

Test page object consistency:

  • Updated HomePage and LoginPage test classes to call super().__init__(page) instead of setting self.page directly, ensuring proper base class initialization. (tests/e2e-test/pages/HomePage.py, tests/e2e-test/pages/loginPage.py) [1] [2]

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

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