From caa9e770cc359775621a2638c73ee7a7d13393f5 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 19 Jul 2026 12:20:25 -0700 Subject: [PATCH] manager: remove preimport stage (#38381) --- .../test/process_replay/process_replay.py | 1 - openpilot/system/manager/manager.py | 5 ----- openpilot/system/manager/process.py | 15 --------------- 3 files changed, 21 deletions(-) diff --git a/openpilot/selfdrive/test/process_replay/process_replay.py b/openpilot/selfdrive/test/process_replay/process_replay.py index 90eb397996..2a90dfc295 100755 --- a/openpilot/selfdrive/test/process_replay/process_replay.py +++ b/openpilot/selfdrive/test/process_replay/process_replay.py @@ -216,7 +216,6 @@ class ProcessContainer: def _start_process(self): if self.capture is not None: self.process.launcher = LauncherWithCapture(self.capture, self.process.launcher) # ty: ignore[invalid-assignment] # intentional wrapper - self.process.prepare() self.process.start() def start( diff --git a/openpilot/system/manager/manager.py b/openpilot/system/manager/manager.py index 2d090b37f0..86fca2723f 100755 --- a/openpilot/system/manager/manager.py +++ b/openpilot/system/manager/manager.py @@ -87,11 +87,6 @@ def manager_init() -> None: dirty=build_metadata.openpilot.is_dirty, device=HARDWARE.get_device_type()) - # preimport all processes - for p in managed_processes.values(): - p.prepare() - - def manager_cleanup() -> None: # send signals to kill all procs for p in managed_processes.values(): diff --git a/openpilot/system/manager/process.py b/openpilot/system/manager/process.py index a0b878d0f2..7f7eabd7be 100644 --- a/openpilot/system/manager/process.py +++ b/openpilot/system/manager/process.py @@ -70,10 +70,6 @@ class ManagerProcess(ABC): shutting_down = False restart_if_crash = False - @abstractmethod - def prepare(self) -> None: - pass - @abstractmethod def start(self) -> None: pass @@ -150,9 +146,6 @@ class NativeProcess(ManagerProcess): self.sigkill = sigkill self.launcher = nativelauncher - def prepare(self) -> None: - pass - def start(self) -> None: # In case we only tried a non blocking stop we need to stop it before restarting if self.shutting_down: @@ -178,11 +171,6 @@ class PythonProcess(ManagerProcess): self.launcher = launcher self.restart_if_crash = restart_if_crash - def prepare(self) -> None: - if self.enabled: - cloudlog.info(f"preimporting {self.module}") - importlib.import_module(self.module) - def start(self) -> None: # In case we only tried a non blocking stop we need to stop it before restarting if self.shutting_down: @@ -211,9 +199,6 @@ class DaemonProcess(ManagerProcess): def should_run(started, params, CP): return True - def prepare(self) -> None: - pass - def start(self) -> None: if self.params is None: self.params = Params()