Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion airflow-core/src/airflow/utils/log/file_task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ def _read(
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 == TaskInstanceState.UP_FOR_RETRY) and 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
Expand Down