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.