Ash Berlin-Taylor commented on AIRFLOW-1667:

The process that writes to the log files is a sub-process of the celery worker 
itself – that just invokes {{airflow run --local}} - and that means the flush 
should happen as soon the task instance finishes running.

I do not see this behaivour on Py3/1.9.0 - our tasks appear in S3 when the task 
instance is finished. Are you saying you have to stop the {{airflow worker}} 
process for the logs to appear in S3?

> Remote log handlers don't upload logs on task finish
> ----------------------------------------------------
>                 Key: AIRFLOW-1667
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1667
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: logging
>    Affects Versions: 1.9.0, 1.10.0
>            Reporter: Arthur Vigil
>            Priority: Major
> AIRFLOW-1385 revised logging for configurability, but the provided remote log 
> handlers (S3TaskHandler and GCSTaskHandler) only upload on close (flush is 
> left at the default implementation provided by `logging.FileHandler`). A 
> handler will be closed on process exit by `logging.shutdown()`, but depending 
> on the Executor used worker processes may not regularly shutdown, and can 
> very likely persist between tasks. This means during normal execution log 
> files are never uploaded.
> Need to find a way to flush remote log handlers in a timely manner, but 
> without hitting the target resources unnecessarily.

This message was sent by Atlassian JIRA

Reply via email to