From ad0464cd1c7533369e1bb13615ff434fc1090951 Mon Sep 17 00:00:00 2001 From: Neilk1021 Date: Fri, 31 Jul 2026 11:15:27 -0700 Subject: [PATCH] fix(pyamber): Invalidate cache while loading executor_def. --- .../main/python/core/architecture/managers/executor_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/amber/src/main/python/core/architecture/managers/executor_manager.py b/amber/src/main/python/core/architecture/managers/executor_manager.py index 7f2249476ad..375033ad60c 100644 --- a/amber/src/main/python/core/architecture/managers/executor_manager.py +++ b/amber/src/main/python/core/architecture/managers/executor_manager.py @@ -99,6 +99,9 @@ def load_executor_definition(self, code: str) -> type(Operator): f"{Path(self.fs.getsyspath('/')).joinpath(file_name)}." ) + # Clear importlib's directory listing cache so freshly written + # temporary modules are discoverable on systems with coarse mtime. + importlib.invalidate_caches() # gen_module_file_name guarantees module_name is unique across # the process, so import_module will always cleanly load source # from the tmp fs we just wrote — no re-import / reload dance.