Add API endpoint and UI for deadline callback log visibility#66610
Open
seanghaeli wants to merge 18 commits into
Open
Add API endpoint and UI for deadline callback log visibility#66610seanghaeli wants to merge 18 commits into
seanghaeli wants to merge 18 commits into
Conversation
ferruzzi
reviewed
May 13, 2026
2b1e618 to
9102967
Compare
e303ead to
f6103b3
Compare
7f042b1 to
b300616
Compare
Contributor
|
I like the interface but I would like to have @bbovenzi opinion on this one |
e8a1b93 to
528ce64
Compare
400961e to
b9a6f9c
Compare
added 9 commits
June 8, 2026 20:44
The rebase conflict resolution dropped the callback logs service function. Re-add it to match the types.gen.ts and backend endpoint.
The manual merge conflict resolution left stale URL/params in services.gen.ts that didn't match the actual API endpoint signature (dag_id, dag_run_id, callback_id vs callback_id, try_number).
368fb19 to
8ce33e6
Compare
Async (TriggererCallback) deadline callbacks now have their logs captured
to a dedicated file path that the UI log endpoint can read, matching the
pattern already established for sync (ExecutorCallback) logs.
Changes:
- TriggerLoggingFactory.ti is now optional (None for callback triggers)
- _create_workload sets up logger_cache for callback triggers without a
task instance, writing to triggerer_callbacks/{dag_id}/{run_id}/{cb_id}
- callback_log_reader checks both executor_callbacks/ and
triggerer_callbacks/ paths when reading logs
- upload_to_remote gracefully handles ti=None by uploading directly
via the remote log handler
Member
|
Why is the callback logs a modal, rather than a tab? (I'm not saying it's wrong, I would just like to know your thinking and what made you chose this over another option) Additionally we should likely use the existing log component so that it gets the same filtering, formatting, and grouping, not just displayed as plain text. |
Contributor
Author
|
@ashb I thought about making the logs appear in a new tab next to Details where the rest of the logs are, but this page only appears when a deadline is missed, so grouping it up with the “Deadline Missed” section makes more spatial sense in my opinion. |
Address review feedback from Ash — use the existing log component (TaskLogContent) instead of a custom renderer so callback logs get the same filtering, formatting, grouping, and virtualization as task instance logs.
6ab1317 to
1c8fc49
Compare
Contributor
Author
|
@ashb updated to use |
added 4 commits
June 10, 2026 17:15
The (datum as StructuredLogMessage) cast was redundant — datum is already narrowed by the typeof check. CI's lint autofix stripped the cast, which left the StructuredLogMessage import unused and triggered TS6196. Remove both the cast and the now-unused import.
…elated to UI changes)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
CallbackLogReaderutility (airflow-core/src/airflow/utils/log/callback_log_reader.py) — reads callback logs from remote or local storage using the sameRemoteLogIOinfrastructure as task logsGET /ui/dags/{dag_id}/dagRuns/{dag_run_id}/callbacks/{callback_id}/logson the deadlines UI routerDeadlineResponsedatamodel — addedcallback_idandcallback_statefieldsFrontend:
CallbackLogViewer.tsxcomponent — fetches and displays callback execution logs in a modal dialogMotivation
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
executor_callbacks/{dag_id}/{run_id}/{callback_id}Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.6) following the guidelines
End-to-End Verification
Verified in breeze with full Airflow stack (scheduler + dag-processor + triggerer + API server + LocalExecutor). A test DAG with a
SyncCallbackdeadline was parsed, unpaused, scheduled, and the deadline missed naturally. The callback executed throughsupervise_callback()and produced real structured logs.Dag Run Page — Deadline Status with Callback
Callback Logs Modal
Verified:
test_callback_logs.py)test_callback_log_reader.py)os.path.commonpathcontainment check