Skip to content

Extract log tail from failed Task Instances #31#68197

Open
sharan-s2k wants to merge 19 commits into
apache:mainfrom
break-through-19:extract-log
Open

Extract log tail from failed Task Instances #31#68197
sharan-s2k wants to merge 19 commits into
apache:mainfrom
break-through-19:extract-log

Conversation

@sharan-s2k
Copy link
Copy Markdown

Add automatic log tail capture for failed task instances

Fetch the last N lines (default 200, configurable via [triage] in
airflow.cfg) from task logs using Airflow's TaskLogReader so triage
does not require opening the log viewer for every incident. A listener
captures tails on failed and skipped tasks; get_task_log_tail supports
on-demand UI access with an in-memory cache. Log read failures degrade
gracefully without crashing the plugin.

sanwar47 and others added 18 commits May 14, 2026 08:53
The polling loop that waits for the supervisor process to exit used:

    while job.is_running:
        await sleep(0.1)

This trips ruff ASYNC110 (await inside a while-condition loop).
Refactor to the ASYNC110-clean pattern used elsewhere:

    while True:
        if not job.is_running:
            break
        await sleep(0.1)

Same behaviour, passes static-checks CI.
docs(team_project): add team workspace with project plan and architec…
feat(team_project): add heuristic failure classifier with five-catego…
feat(team_project): add Airflow log normalization layer
feat(team_project): seed remediation knowledge base with eight Airflo…
Add automatic log tail capture for failed task instances

Fetch the last N lines (default 200, configurable via [triage] in
airflow.cfg) from task logs using Airflow's TaskLogReader so triage
does not require opening the log viewer for every incident. A listener
captures tails on failed and skipped tasks; get_task_log_tail supports
on-demand UI access with an in-memory cache. Log read failures degrade
gracefully without crashing the plugin.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jun 8, 2026
Add unit and integration-style tests for dag_triage log tail reading,
in-memory cache, listener hooks, and triage configuration. Includes
MockTaskLogReader helpers and Airflow stubs so tests run standalone
without a full Airflow runtime. Wire pytest dev dependencies and
pythonpath in team_project/pyproject.toml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:go-sdk area:task-sdk area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants