Skip to content

Commit

Permalink
Use /bin/bash -c in EcsRunLauncher command
Browse files Browse the repository at this point in the history
  • Loading branch information
johannkm committed Sep 27, 2022
1 parent 1e8f629 commit 5c9578f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -222,7 +222,7 @@ def launch_run(self, context: LaunchRunContext) -> None:
pipeline_run_id=run.run_id,
instance_ref=self._instance.get_ref(),
)
command = args.get_command_args()
command = ["/bin/bash", "-c", " ".join(args.get_command_args())]

# Set cpu or memory overrides
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
Expand Down
Expand Up @@ -83,7 +83,8 @@ def test_default_launcher(
assert len(overrides) == 1
override = overrides[0]
assert override["name"] == "run"
assert "execute_run" in override["command"]
assert ["/bin/bash", "-c"] == override["command"][:2]
assert 'dagster api execute_run {"__class__": "ExecuteRunArgs",' in override["command"][2]
assert run.run_id in str(override["command"])

# And we log
Expand Down Expand Up @@ -295,7 +296,8 @@ def test_launching_custom_task_definition(
assert len(overrides) == 1
override = overrides[0]
assert override["name"] == container_name
assert "execute_run" in override["command"]
assert ["/bin/bash", "-c"] == override["command"][:2]
assert 'dagster api execute_run {"__class__": "ExecuteRunArgs",' in override["command"][2]
assert run.run_id in str(override["command"])


Expand Down

0 comments on commit 5c9578f

Please sign in to comment.