ido177 commented on code in PR #54547:
URL: https://github.com/apache/airflow/pull/54547#discussion_r2281846135
##########
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:
when a task transitions to UP_FOR_RETRY and remote logging or a shared drive
is not configured, we don’t fall back to served logs. This leaves the
source_list empty and the UI ends up showing no logs at all, even though the
logs from the last try are already available.
This happens because TaskInstanceState.UP_FOR_RETRY is part of
State.unfinished, but in this code we only treat RUNNING and DEFERRED as
unfinished. So the state is considered “not finished,” but it isn’t handled
consistently for log serving.
Adding UP_FOR_RETRY here just closes that gap and ensures the logs remain
visible in the UI after the transition to UP_FOR_RETRY state.
--
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]