Skip to content

Conversation

@malto101
Copy link
Member

No description provided.

…loat in press_by_percentage method

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
…reation and initialization methods

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
…lements method

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
…cess command

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Copilot AI review requested due to automatic review settings September 24, 2025 07:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a supervisor tool that provides vertical scaling for the Optics Framework API by spawning multiple worker processes and routing requests based on session affinity. The supervisor manages workers, distributes sessions across them, and handles worker failures while maintaining session consistency.

  • Implements a supervisor API that manages multiple worker processes running the Optics API
  • Routes requests based on session IDs to ensure session affinity (same session always goes to same worker)
  • Adds comprehensive test coverage including unit tests and integration tests

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tools/supervisor_app/supervisor_tool.py Main supervisor implementation with worker management, session routing, and health monitoring
tools/supervisor_app/test_supervisor_tool.py Unit tests for supervisor components including config, worker management, and API endpoints
tools/supervisor_app/test_supervisor_integration.py Integration tests for end-to-end supervisor functionality with real worker processes
tools/supervisor_app/Dockerfile Docker configuration for containerized supervisor deployment
tools/mock_site/index.html API URL corrections for session endpoints consistency
pyproject.toml Version bump to 1.6.1
optics_framework/optics.py Added session_id parameter to setup() method for session reuse
optics_framework/helper/version.py Version update to 1.6.1
optics_framework/engines/drivers/appium_UI_helper.py Enabled non-text interactive elements in UI parsing
optics_framework/common/session_manager.py Enhanced session creation to support reusing existing sessions
optics_framework/api/action_keyword.py Fixed percentage coordinate handling to use float instead of int
Docker/prod/Dockerfile Added service account JSON file for Google Vision integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

import pytest

# Add the tools directory to path
sys.path.insert(0, '/Users/dhruvmenon/Documents/optics-framework-1/tools')
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

This hardcoded absolute path will break the tests on other systems. Use relative paths or environment variables to make the tests portable across different development environments.

Copilot uses AI. Check for mistakes.
# Start supervisor
supervisor_cmd = [
sys.executable,
"/Users/dhruvmenon/Documents/optics-framework-1/tools/supervisor_tool.py",
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

This hardcoded absolute path will break the tests on other systems. Use relative paths or environment variables to make the tests portable across different development environments.

Copilot uses AI. Check for mistakes.

def setup_method(self):
"""Reset global state before each test."""
global workers, session_map, worker_index
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The variable worker_index is referenced but not imported from the module. This will cause a NameError when the test runs.

Copilot uses AI. Check for mistakes.
global workers, session_map, worker_index
workers.clear()
session_map.clear()
worker_index = 0
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The variable worker_index is referenced but not imported from the module. This will cause a NameError when the test runs.

Copilot uses AI. Check for mistakes.
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
… format

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
11 Security Hotspots
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants