Page MenuHomeElementl

Don't inherit entryPoint from Task Definition
ClosedPublic

Authored by jordansanders on Jul 15 2021, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 23, 2:08 AM
Unknown Object (File)
Tue, Nov 22, 9:30 PM
Unknown Object (File)
Fri, Nov 18, 1:15 AM
Unknown Object (File)
Fri, Nov 18, 1:15 AM
Unknown Object (File)
Fri, Nov 18, 1:14 AM
Unknown Object (File)
Mon, Nov 14, 6:42 PM
Unknown Object (File)
Wed, Nov 9, 7:21 PM
Unknown Object (File)
Tue, Nov 8, 8:50 PM
Subscribers
None

Details

Summary

The EcsRunLauncher constructs a Task Definition based on the Task
Definition its current process. It then launches a new Task with a
commandOverride.

Because of how Docker treats ENTRYPOINT and CMD, if a Task Definition
has an entryPoint set and a Task has a commandOverride set, the
container will run with the entryPoint and commandOverride concatenated
together:

https://aws.amazon.com/blogs/opensource/demystifying-entrypoint-cmd-docker/

That means we could end up running:

dagster-daemon run ... dagster api execute_run ...

Which will error with:

Error: Got unexpected extra arguments (dagster api execute_run {...})

We've had several users bump into this both with the EcsRunLauncher and
the DockerRunLauncher. This change fixes the EcsRunLauncher so that it
ignores entryPoint when inheriting and constructing a new Task
Definition. However, it doesn't completely guard against this class of
errors: users might still run into this issue when their image contains
an ENTRYPOINT.

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

users might still run into this issue when their image contains an ENTRYPOINT.

in docs?

This revision is now accepted and ready to land.Jul 15 2021, 10:58 PM

users might still run into this issue when their image contains an ENTRYPOINT.

in docs?

We don't really have docs for this yet - it's on my to do list. But I'll make sure it ends up in there when I publish them.