dominikhei commented on issue #51429:
URL: https://github.com/apache/airflow/issues/51429#issuecomment-3050349952
> Perhaps I'm missing something but doesn't an ECS Task require at least one
Container to get instantiated? For example, when I register a task without a
container:
>
> ```
> register_task = EcsRegisterTaskDefinitionOperator(
> task_id="register_task",
> family="empty-containers-test",
> register_task_kwargs={
> "cpu": "256",
> "memory": "512",
> "networkMode": "awsvpc",
> },
> )
> ```
>
> Airflow gives me the following error at compile time:
>
> `TypeError: missing keyword argument 'container_definitions'`
>
> I'm a bit confused how we end up in a situation where we're running an ECS
Task without any containers
The RunTaskOperator does not require you to specify a container name only a
task definition name. As `boto3.run_task` is eventually consistent it does not
necessarily return the container name, depending on the task state. If we don't
set the name in the operator it is inferred from the api response (which could
be None due to eventual consistency) -> Thus we run the task with containers
but they are specified in the task definition, which is enough for the
RunTaskOperator. Hence my idea to infer them from the `describe_tasks` endpoint
if `run_task` returns no container.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]