is it possible to configure the ecs agent so that ...
# prefect-community
k
is it possible to configure the ecs agent so that it sets the flow run container command to include
-l
(I want a login shell). Seems like currently its passing the command like so
Copy code
overrides
    containerOverrides
        command": [
            "/bin/sh",
            "-c",
            "prefect execute flow-run"
        ]
Also, possible or not, is this command stable / is it safe to customize this?
I already have a custom
flow_task_def.yml
file that I am using, I guess just wondering if its save to specify a custom command here
k
That looks hardcoded and I don’t think it can be changed easily, but there is a good argument to allow customizability. Can you chime in here ?
k
Added a comment
k
Thanks!
k
Looking at the code a bit more, I am not sure it makes sense to just support specifying a
command
in the run task kwargs, given that the prefect run command is a bit opaque, and probably something yall want to keep tight control over. Perhaps adding 2 new parameters to ECSRun • shell: str, default = ‘/bin/sh’ • shell arguments: [str], default = [] If set on the ECSRun, they could be injected into the command around here: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/ecs/agent.py#L505
Or I guess just respect the ENTRYPOINT on the container. Hmmm
k
This likely won’t get worked on for 1.0, but I think as long as the shortcomings of the current method are documented, we can shape it for 2.0. It is too restrictive
k
Would yall accept a PR related to this on 1.0?
k
Tough for be to answer haha. I will ask Michael because we may be opinionated about how a PR is shaped
1