potiuk commented on code in PR #31101:
URL: https://github.com/apache/airflow/pull/31101#discussion_r1186431494


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -317,18 +316,24 @@ def _read(
                 executor_messages, executor_logs = response
             if executor_messages:
                 messages_list.extend(messages_list)
-        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)
         if not (remote_logs and ti.state not in State.unfinished):

Review Comment:
   As discussed on slack, and also mentioned earlier by @zachliu - those 
conditions are difficult to wrap your head around them  - wrapping them in 
method names after their meaning ('if _local_or_finished():'` for example) migh 
help with reviewability :)



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