kanga333 opened a new issue #21573:
URL: https://github.com/apache/airflow/issues/21573


   ### Apache Airflow Provider(s)
   
   amazon
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==2.6.0
   
   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### Operating System
   
   Amazon Linux2
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   ECS Operator doesn't print ECS task logs stored in CloudWatchLogs when ECS 
task has finished within 30 seconds.
   
   ### What you expected to happen
   
   I expected to see ECS task logs in the Airflow logs view.
   
   ### How to reproduce
   
   You create a simple ECS task that executes only "echo hello world" and runs 
it by ECS Operator, and ECS Operator doesn't print "hello world" in Airflow 
logs view. But we can see it XCom's result.
   
   ### Anything else
   
   I think EcsTaskLogFetcher needs to get log events after sleep. When 
EcsTaskLogFetcher thread receives a stop signal, EcsTaskLogFetcher will stop 
run method without getting a log event that is happened during a sleep period.
   
   
https://github.com/apache/airflow/blob/8155e8ac0abcaf3bb02b164fd7552e20fa702260/airflow/providers/amazon/aws/operators/ecs.py#L122
   
   I think maybe #19426 is the same problem.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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