kxepal commented on issue #31764:
URL: https://github.com/apache/airflow/issues/31764#issuecomment-1615506637
We faced this issue after upgrade from 2.5.1 to 2.6.2 and eventually solved
it using this patch:
```
--- airflow/utils/log/file_task_handler.py.orig 2023-06-30 12:42:39 UTC
+++ airflow/utils/log/file_task_handler.py
@@ -324,7 +324,7 @@ class FileTaskHandler(logging.Handler):
if ti.state in (TaskInstanceState.RUNNING,
TaskInstanceState.DEFERRED) and not executor_messages:
served_messages, served_logs = self._read_from_logs_server(ti,
worker_log_rel_path)
messages_list.extend(served_messages)
- elif ti.state not in State.unfinished and not (local_logs or
remote_logs):
+ elif not (local_logs or remote_logs):
# ordinarily we don't check served logs, with the assumption
that users set up
# remote logging or shared drive for logs for persistence, but
that's not always true
# so even if task is done, if no local logs or remote logs are
found, we'll check the worker
```
Not sure if it's corrent one, but at least it works.
--
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]