Skip to content

Commit

Permalink
fix sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetretto committed Sep 27, 2024
1 parent 4859911 commit a588834
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jobflow_remote/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a588834

Please sign in to comment.