Skip to content

Fix missing logs in UI for tasks in UP_FOR_RETRY and UP_FOR_RESCHEDULE states (#54544)#54547

Merged
eladkal merged 1 commit intoapache:mainfrom
ido177:fix-no-logs-file-task-handler
Mar 4, 2026
Merged

Fix missing logs in UI for tasks in UP_FOR_RETRY and UP_FOR_RESCHEDULE states (#54544)#54547
eladkal merged 1 commit intoapache:mainfrom
ido177:fix-no-logs-file-task-handler

Conversation

@ido177
Copy link
Copy Markdown
Contributor

@ido177 ido177 commented Aug 15, 2025

closes: #54544


Fix missing logs in UI for tasks in UP_FOR_RETRY state

Include TaskInstanceState.UP_FOR_RETRY in the log retrieval condition
to ensure logs are shown when a task retries. Previously, tasks that
entered UP_FOR_RETRY had no logs displayed in the UI when using local
log storage.

@boring-cyborg
Copy link
Copy Markdown

boring-cyborg Bot commented Aug 15, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@ido177 ido177 force-pushed the fix-no-logs-file-task-handler branch from 4aca488 to c09e533 Compare August 15, 2025 17:59
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py Outdated
@ido177 ido177 force-pushed the fix-no-logs-file-task-handler branch from c09e533 to bf742f5 Compare August 18, 2025 12:30
@eladkal eladkal force-pushed the fix-no-logs-file-task-handler branch from bf742f5 to aeec657 Compare September 11, 2025 16:44
@eladkal eladkal added this to the Airflow 3.1.0 milestone Sep 11, 2025
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Sep 11, 2025
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py Outdated
@eladkal eladkal changed the title No task logs in airflow UI (#54544) Fix missing logs in UI for tasks in UP_FOR_RETRY state (#54544) Sep 11, 2025
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py Outdated
@ido177 ido177 force-pushed the fix-no-logs-file-task-handler branch 2 times, most recently from 93f848d to 70cbf68 Compare September 17, 2025 16:02
@kaxil kaxil modified the milestones: Airflow 3.1.0, Airflow 3.1.1 Sep 18, 2025
@eladkal eladkal force-pushed the fix-no-logs-file-task-handler branch from 5d1b900 to 22d2777 Compare October 20, 2025 12:36
@kaxil kaxil modified the milestones: Airflow 3.1.1, Airflow 3.1.2 Oct 21, 2025
@kaxil kaxil force-pushed the fix-no-logs-file-task-handler branch from 22d2777 to 549e679 Compare October 31, 2025 14:45
@kaxil
Copy link
Copy Markdown
Member

kaxil commented Oct 31, 2025

let's see what CI says

@kaxil kaxil modified the milestones: Airflow 3.1.2, Airflow 3.1.3 Oct 31, 2025
Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but I think other who look at the task logs should take a look. also I think it calls for a unit test.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Nov 16, 2025

Can you please add unit test @ido177

@potiuk potiuk removed this from the Airflow 3.1.5 milestone Dec 14, 2025
@ido177 ido177 force-pushed the fix-no-logs-file-task-handler branch from f4d34ef to 4da3584 Compare March 4, 2026 08:35
@ido177
Copy link
Copy Markdown
Contributor Author

ido177 commented Mar 4, 2026

Hi, just added UP_FOR_RESCHEDULE state into check and _STATES_WITH_COMPLETED_ATTEMPT frozenset

@eladkal
Copy link
Copy Markdown
Contributor

eladkal commented Mar 4, 2026

@ido177 can you fix static checks?

@eladkal eladkal changed the title Fix missing logs in UI for tasks in UP_FOR_RETRY state (#54544) Fix missing logs in UI for tasks in UP_FOR_RETRY and UP_FOR_RESCHEDULE states (#54544) Mar 4, 2026
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py Outdated
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py
Comment thread airflow-core/src/airflow/utils/log/file_task_handler.py Outdated
@ido177 ido177 force-pushed the fix-no-logs-file-task-handler branch from 501631a to 9c87e55 Compare March 4, 2026 10:57
@eladkal eladkal merged commit f7ce3ec into apache:main Mar 4, 2026
72 checks passed
github-actions Bot pushed a commit that referenced this pull request Mar 4, 2026
…P_FOR_RESCHEDULE` states (#54547)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Backport successfully created: v3-1-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-1-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Mar 4, 2026
…P_FOR_RESCHEDULE` states (apache#54547)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Backport failed to create: v2-11-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v2-11-test Commit Link

You can attempt to backport this manually by running:

cherry_picker f7ce3ec v2-11-test

This should apply the commit to the v2-11-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

vatsrahul1001 pushed a commit that referenced this pull request Mar 4, 2026
…P_FOR_RESCHEDULE` states (#54547)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
potiuk pushed a commit that referenced this pull request Mar 4, 2026
…UP_FOR_RESCHEDULE` states (#54547)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Mar 4, 2026

Backport to 2.11.2 #62877

pierrejeambrun pushed a commit that referenced this pull request Mar 4, 2026
…P_FOR_RESCHEDULE` states (#54547) (#62862)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
potiuk added a commit that referenced this pull request Mar 4, 2026
…UP_FOR_RESCHEDULE` states (#54547) (#62877)

(cherry picked from commit f7ce3ec)

Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
potiuk added a commit that referenced this pull request Mar 6, 2026
…Y` and `UP_FOR_RESCHEDULE` states (#54547) (#62877)"

This reverts commit 32aa552.
potiuk added a commit that referenced this pull request Mar 6, 2026
…Y` and `UP_FOR_RESCHEDULE` states (#54547) (#62877)"

This reverts commit 32aa552.
potiuk added a commit that referenced this pull request Mar 6, 2026
…Y` and `UP_FOR_RESCHEDULE` states (#54547) (#62877)"

This reverts commit 32aa552.
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:logging _eol_backport-to-v2-11-test Mark PR with this label to backport to v2-11-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No task logs in airflow UI

8 participants