diff --git a/src/jobflow_remote/config/base.py b/src/jobflow_remote/config/base.py index ec86901..485e7eb 100644 --- a/src/jobflow_remote/config/base.py +++ b/src/jobflow_remote/config/base.py @@ -251,7 +251,9 @@ def get_host(self) -> BaseHost: ------- The LocalHost. """ - return LocalHost(timeout_execute=self.timeout_execute) + return LocalHost( + timeout_execute=self.timeout_execute, sanitize=self.sanitize_command + ) @property def cli_info(self) -> dict: @@ -401,6 +403,7 @@ def get_host(self) -> BaseHost: shell_cmd=self.shell_cmd, login_shell=self.login_shell, interactive_login=self.interactive_login, + sanitize=self.sanitize_command, ) @property diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3fca2c1..80d19a3 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -228,6 +228,7 @@ def write_tmp_settings( scheduler_type="shell", work_dir=str(workdir), resources={}, + sanitize_command=True, ), "test_remote_worker": dict( type="remote", diff --git a/tests/integration/test_slurm.py b/tests/integration/test_slurm.py index ce6329e..cb24a04 100644 --- a/tests/integration/test_slurm.py +++ b/tests/integration/test_slurm.py @@ -319,6 +319,8 @@ def test_sanitize(worker, job_controller): from jobflow_remote.jobs.state import JobState from jobflow_remote.testing import add + assert job_controller.project.workers[worker].get_host().sanitize is True + flow = Flow([add(1, 2)]) submit_flow(flow, worker=worker)