iamapez opened a new pull request, #58806:
URL: https://github.com/apache/airflow/pull/58806

   Implements `get_task_log()` for the ECS Executor to fetch live logs from 
CloudWatch and display them in the Airflow UI during task execution.
   
   Currently the ECS Executor doesn't implement this method, so users can't see 
task logs in the UI while tasks are running. This follows the same pattern as 
KubernetesExecutor.
   
   ## Changes
   
   - Added `get_task_log()` method that fetches logs from CloudWatch using 
`AwsLogsHook`
   - Added config options: `cloudwatch_logs_enabled`, `cloudwatch_logs_group`, 
`cloudwatch_logs_stream_prefix`, `cloudwatch_logs_region`
   - Disabled by default (opt-in)
   
   ## Configuration
   
   ```ini
   [aws_ecs_executor]
   cloudwatch_logs_enabled = True
   cloudwatch_logs_group = /ecs/airflow-tasks
   cloudwatch_logs_stream_prefix = ecs
   cloudwatch_logs_region = us-east-1
   ```
   
   ECS task definition must use the `awslogs` log driver with matching config. 
Scheduler needs `logs:GetLogEvents` IAM permission.
   
   ## Testing
   
   - Added unit tests for all new functionality
   - All existing tests pass


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