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


##########
airflow-core/src/airflow/utils/log/file_task_handler.py:
##########
@@ -610,6 +610,11 @@ def _read(
         local_logs: list[RawLogStream] = []
         executor_logs: list[RawLogStream] = []
         served_logs: list[RawLogStream] = []
+        is_in_not_finished_state = ti.state in (
+            TaskInstanceState.RUNNING,
+            TaskInstanceState.DEFERRED,
+            TaskInstanceState.UP_FOR_RETRY

Review Comment:
   > What happens when the task is in SUCCESS or FAILED state? Why do those 
work?
   
   It works because of line 650, as you can see SUCCESS and FAILED are not 
defined in State.unfinished but UP_FOR_RETRY is actually a part of it
   
https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/utils/state.py#L191
   
   Thus, the UP_FOR_RETRY state is not processed in any way while looking for 
served 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