seanghaeli opened a new pull request, #66610:
URL: https://github.com/apache/airflow/pull/66610
## Summary
Make deadline callback logs visible in the Airflow UI. When a deadline is
missed and a callback fires, users can now view the callback's execution logs
directly from the web interface.
## Changes
**Backend:**
- New `CallbackLogReader` utility
(`airflow-core/src/airflow/utils/log/callback_log_reader.py`) — reads callback
logs from remote or local storage using the same `RemoteLogIO` infrastructure
as task logs
- New API endpoint `GET
/ui/dags/{dag_id}/dagRuns/{dag_run_id}/callbacks/{callback_id}/logs` on the
deadlines UI router
- Updated `DeadlineResponse` datamodel — added `callback_id` and
`callback_state` fields
**Frontend:**
- `CallbackLogViewer.tsx` component — fetches and displays callback
execution logs in a modal dialog
- Simplified deadline status display: inline "Missed" badge + "Callback
Logs" button + expected/actual times (no success badge, no "Finished late"
text, no alert name)
## Motivation
Kaxil requested this: "Some way to know if a deadline didn't fire and it
failed: something on UI would be great, like Task log. If deadlines are
visible, it would be even better experience than previous SLAs."
## Dependencies
- Builds on #66379 (remote log upload for callbacks) which uploads the logs
to storage
- The log path format is `executor_callbacks/{dag_id}/{run_id}/{callback_id}`
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.6)
Generated-by: Claude Code (Opus 4.6) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
## End-to-End Verification
Verified in breeze with full Airflow stack (scheduler + dag-processor +
triggerer + API server + LocalExecutor). A test DAG with a `SyncCallback`
deadline was parsed, unpaused, scheduled, and the deadline missed naturally.
The callback executed through `supervise_callback()` and produced real
structured logs.
### Dag Run Page — Deadline Status with Callback

### Callback Logs Modal

**Verified:**
- 6/6 API unit tests pass (`test_callback_logs.py`)
- 12/12 log reader unit tests pass (`test_callback_log_reader.py`)
- Path traversal protection via regex validation + `os.path.commonpath`
containment check
- Stress tested with 10K-100K line logs: 10K lines renders in 0.23s,
acceptable for realistic callback output
--
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]