iamapez opened a new issue, #58205:
URL: https://github.com/apache/airflow/issues/58205

   ### Apache Airflow version
   3.1.1
   
   ### What happened
   The ECS Executor fails immediately on scheduler startup with:
   ```
   AttributeError: 'TaskInstance' object has no attribute 'command_as_list'
   ```
   
   This occurs in `/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py` 
line 598 in the `try_adopt_task_instances` method when the scheduler attempts 
to adopt orphaned tasks.
   
   ### What you think should happen instead
   The ECS Executor should work with Airflow 3.x. The `command_as_list()` 
method was removed as part of the Task SDK refactoring in Airflow 3.0.
   
   ### How to reproduce
   1. Install Airflow 3.1.1
   2. Install apache-airflow-providers-amazon==9.16.0
   3. Configure 
`AIRFLOW__CORE__EXECUTOR=airflow.providers.amazon.aws.executors.ecs.ecs_executor.AwsEcsExecutor`
   4. Start the scheduler
   5. Scheduler crashes in boot loop with the above error
   
   ### Operating System
   Debian GNU/Linux 12 (in Docker/ECS)
   
   ### Versions of Apache Airflow Providers
   apache-airflow-providers-amazon==9.16.0
   
   ### Deployment
   Amazon (AWS) - ECS
   
   ### Anything else
   I found that PR #48513 (commit 8e8c84f) from April 2025 supposedly fixed 
this issue for Task SDK support, but this fix is NOT in the 9.16.0 release from 
October 2025.
   
   I verified this by downloading the 9.16.0 package from PyPI and checking 
line 598:
   ```bash
   pip download apache-airflow-providers-amazon==9.16.0 --no-deps
   unzip apache_airflow_providers_amazon-9.16.0-py3-none-any.whl
   grep -n "command_as_list" 
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
   # Output: 598:                        ti.command_as_list(),
   ```
   
   The current workaround is to install from main branch:
   ```
   pip install 
git+https://github.com/apache/airflow.git@main#subdirectory=providers/amazon
   ```
   
   This is blocking production deployments using ECS Executor with Airflow 3.x.
   
   ### Are you willing to submit PR?
   - [ ] Yes I am willing to submit a PR (though the fix already exists in main)
   
   ### Code of Conduct
   - [X] I agree to follow this project's Code of Conduct


-- 
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]

Reply via email to