rapsealk opened a new issue, #66268:
URL: https://github.com/apache/airflow/issues/66268

   ## Description
   
   Deadline Alerts shipped in Airflow 3.1, with UI improvements (deadlineStatus 
panel) in 3.2. The feature is documented in 
[\`docs/howto/deadline-alerts.rst\`](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/deadline-alerts.rst),
 but **no runnable example DAG ships in 
\`airflow-core/src/airflow/example_dags/\`**. Every other major DAG-authoring 
feature (assets, branching, dynamic task mapping, params, setup/teardown, etc.) 
has at least one example DAG there.
   
   This makes it harder for users to:
   - Try Deadline Alerts in a fresh Airflow install (\`load_examples=True\`).
   - See the deadlineStatus UI panel populated without writing a custom DAG.
   - Verify localized strings (e.g. the Korean translations added in #66265).
   
   ## Proposal
   
   Add \`airflow-core/src/airflow/example_dags/example_deadline_alert.py\` that:
   - Uses \`DeadlineReference.DAGRUN_LOGICAL_DATE\` with a 1-hour interval.
   - Defines an in-file async callback (no provider dependency).
   - Wraps the body in \`[START example_deadline_alert]\` / \`[END 
example_deadline_alert]\` markers so a follow-up can replace the inline snippet 
in \`deadline-alerts.rst\` with a \`literalinclude\`.
   
   ## Out of scope (follow-up)
   
   - Replacing the inline snippet in \`deadline-alerts.rst\` with 
\`literalinclude\` of the new file.
   - Examples for the other reference types (\`DAGRUN_QUEUED_AT\`, 
\`FIXED_DATETIME\`, \`AVERAGE_RUNTIME\`).
   
   ## Side fix discovered
   
   \`task-sdk/src/airflow/sdk/__init__.pyi\` is missing several names that 
exist at runtime in \`__init__.py\`:
   - \`AsyncCallback\`, \`SyncCallback\` (from \`.definitions.callback\`)
   - \`DeadlineAlert\`, \`DeadlineReference\` (from \`.definitions.deadline\`)
   
   Importing them via the documented path \`from airflow.sdk import 
DeadlineAlert\` triggers \`attr-defined\` errors under mypy. This blocks the 
example DAG from passing static checks. The fix is mechanical (add the missing 
imports + \`__all__\` entries) and will be included in the same PR.
   
   ---
   
   Drafted-by: Claude Code (Opus 4.7) (no human review before posting)


-- 
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]

Reply via email to