Skip to content

Commit

Permalink
[dagster-aws] revert ECSRunLauncher.get_image_for_run staticmethod ch…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni authored Dec 18, 2024
1 parent 0a98a5a commit 910838e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,9 @@ def _get_run_tags(self, run_id: str) -> Tags:
def _get_command_args(self, run_args: ExecuteRunArgs, context: LaunchRunContext):
return run_args.get_command_args()

@staticmethod
def get_image_for_run(run: DagsterRun) -> Optional[str]:
def get_image_for_run(self, context: LaunchRunContext) -> Optional[str]:
"""Child classes can override this method to determine the image to use for a run. This is considered a public API."""
run = context.dagster_run
return (
run.job_code_origin.repository_origin.container_image
if run.job_code_origin is not None
Expand Down Expand Up @@ -467,7 +468,7 @@ def launch_run(self, context: LaunchRunContext) -> None:
instance_ref=self._instance.get_ref(),
)
command = self._get_command_args(args, context)
image = self.get_image_for_run(run)
image = self.get_image_for_run(context)

run_task_kwargs = self._run_task_kwargs(run, image, container_context)

Expand Down

0 comments on commit 910838e

Please sign in to comment.