From 8dbedb7ac5517faac4a18bbc8d61193b7faac1d3 Mon Sep 17 00:00:00 2001 From: "james-in-a-box[bot]" <246424927+james-in-a-box[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 02:37:33 +0000 Subject: [PATCH] Fix hardcoded port numbers in compose.py and orchestration.py Import GATEWAY_PORT from egg_config.constants instead of using hardcoded port values. This fixes the check-hardcoded-ports.py lint check. Authored-by: egg --- sandbox/egg_lib/compose.py | 3 ++- sandbox/egg_lib/orchestration.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sandbox/egg_lib/compose.py b/sandbox/egg_lib/compose.py index ed1a038879..21770c4249 100644 --- a/sandbox/egg_lib/compose.py +++ b/sandbox/egg_lib/compose.py @@ -15,6 +15,7 @@ import time from pathlib import Path +from .config import GATEWAY_PORT from .output import error, info, success @@ -199,7 +200,7 @@ def wait_for_gateway(compose_file: Path, timeout: int = 60) -> bool: info("Waiting for gateway to be healthy...") # Load port from .env or use default - port = "9848" + port = str(GATEWAY_PORT) env_file = get_env_file(compose_file) if env_file: with open(env_file) as f: diff --git a/sandbox/egg_lib/orchestration.py b/sandbox/egg_lib/orchestration.py index 58fe39152c..65d4d3c28a 100644 --- a/sandbox/egg_lib/orchestration.py +++ b/sandbox/egg_lib/orchestration.py @@ -26,6 +26,7 @@ from collections.abc import Callable from dataclasses import dataclass +from .config import GATEWAY_PORT from .context import get_context from .docker import ensure_gateway_networks from .gateway import cleanup_gateway as gateway_cleanup @@ -39,7 +40,7 @@ class OrchestrationResult: success: bool gateway_ip: str | None = None - gateway_port: int = 9848 + gateway_port: int = GATEWAY_PORT error_message: str | None = None