ENGINE: Cutover Pains and Fixes

This commit is contained in:
2025-11-01 04:44:23 -06:00
parent b815592639
commit 02eae72c0d
7 changed files with 1866 additions and 29 deletions

View File

@@ -15,7 +15,7 @@
"name": "server_url",
"label": "Borealis Server URL",
"type": "string",
"default": "http://localhost:5000",
"default": "https://localhost:5000",
"required": true,
"description": "URL of where the agent is going to reach-out to moving forward."
}

View File

@@ -77,11 +77,11 @@ def _stage_web_interface_assets(logger: Optional[logging.Logger] = None, *, forc
project_root = _project_root()
engine_web_root = project_root / "Engine" / "web-interface"
legacy_source = project_root / "Data" / "Server" / "WebUI"
stage_source = project_root / "Data" / "Engine" / "web-interface"
if not legacy_source.is_dir():
if not stage_source.is_dir():
raise RuntimeError(
f"Engine web interface source missing: {legacy_source}"
f"Engine web interface source missing: {stage_source}"
)
index_path = engine_web_root / "index.html"
@@ -92,14 +92,14 @@ def _stage_web_interface_assets(logger: Optional[logging.Logger] = None, *, forc
if engine_web_root.exists():
shutil.rmtree(engine_web_root)
shutil.copytree(legacy_source, engine_web_root)
shutil.copytree(stage_source, engine_web_root)
if not index_path.is_file():
raise RuntimeError(
f"Engine web interface staging failed; missing {index_path}"
)
logger.info("Engine web interface staged from %s to %s", legacy_source, engine_web_root)
logger.info("Engine web interface staged from %s to %s", stage_source, engine_web_root)
return engine_web_root

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any
try: # pragma: no cover - legacy module import guard
import job_scheduler as legacy_job_scheduler # type: ignore
try: # pragma: no cover - Engine-local legacy scheduler shim
from . import legacy_job_scheduler # type: ignore
except Exception as exc: # pragma: no cover - runtime guard
legacy_job_scheduler = None # type: ignore
_SCHEDULER_IMPORT_ERROR = exc
@@ -36,8 +36,8 @@ if TYPE_CHECKING: # pragma: no cover - typing aide
def _raise_scheduler_import() -> None:
if _SCHEDULER_IMPORT_ERROR is not None:
raise RuntimeError(
"Legacy job scheduler module could not be imported; ensure Data/Server/job_scheduler.py "
"remains available during the Engine migration."
"Legacy job scheduler module could not be imported; ensure "
"Data/Engine/services/API/scheduled_jobs/legacy_job_scheduler.py remains available."
) from _SCHEDULER_IMPORT_ERROR
@@ -79,4 +79,3 @@ def register_management(app: "Flask", adapters: "EngineServiceAdapters") -> None
"""Ensure scheduled job routes are registered via the legacy scheduler."""
ensure_scheduler(app, adapters)