rapsealk opened a new pull request, #66269: URL: https://github.com/apache/airflow/pull/66269
Adds a runnable example DAG for the Deadline Alerts feature (introduced in 3.1, UI improvements in 3.2). Users with `load_examples=True` will get a working DAG that exercises the deadlineStatus UI panel without having to write a custom DAG. ## Changes - **`airflow-core/src/airflow/example_dags/example_deadline_alert.py`** (new) — uses `DeadlineReference.DAGRUN_LOGICAL_DATE` with a 1-hour interval and an in-file async callback (no provider dependency). Wrapped in `[START]/[END]` markers so a follow-up can replace the inline snippet in `docs/howto/deadline-alerts.rst` with a `literalinclude`. - **`task-sdk/src/airflow/sdk/__init__.pyi`** — adds the missing stub entries for `AsyncCallback`, `SyncCallback`, `DeadlineAlert`, `DeadlineReference`. They exist at runtime via lazy imports in `__init__.py`, but were absent from the stub, so `from airflow.sdk import DeadlineAlert` (the form used in `deadline-alerts.rst`) failed mypy `attr-defined` checks. ## Verification - `prek run --files airflow-core/src/airflow/example_dags/example_deadline_alert.py task-sdk/src/airflow/sdk/__init__.pyi` — all hooks pass (mypy included). - DAG parses and registers correctly: `dag_id=example_deadline_alert`, deadline configured, single `hello_deadline` task. closes: #66268 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
