eladkal commented on code in PR #54547:
URL: https://github.com/apache/airflow/pull/54547#discussion_r2882880033


##########
airflow-core/src/airflow/utils/log/file_task_handler.py:
##########
@@ -643,8 +648,12 @@ def _read(
             source_list.extend(sources)
         if ti.state in (TaskInstanceState.RUNNING, TaskInstanceState.DEFERRED) 
and not has_k8s_exec_pod:
             sources, served_logs = self._read_from_logs_server(ti, 
worker_log_rel_path)
-            source_list.extend(sources)
-        elif ti.state not in State.unfinished and not (local_logs or 
remote_logs):
+        elif (ti.state not in State.unfinished or ti.state in 
(TaskInstanceState.UP_FOR_RETRY, TaskInstanceState.UP_FOR_RESCHEDULE)) and not (
+            local_logs or remote_logs
+        ):
+        elif (ti.state not in State.unfinished or ti.state in 
_STATES_WITH_COMPLETED_ATTEMPT) and not (
+            local_logs or remote_logs

Review Comment:
   ```suggestion
           elif (ti.state not in State.unfinished or ti.state in 
_STATES_WITH_COMPLETED_ATTEMPT) and not (
               local_logs or remote_logs
   ```



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