rjgoyln opened a new pull request, #71850:
URL: https://github.com/apache/airflow/pull/71850

   ## Summary
   
   A custom deadline reference registered as 
`DeadlineReference.TYPES.DAGRUN_QUEUED` is never re-anchored when its Dag run 
is cleared — the built-in `DAGRUN_QUEUED_AT` deadline moves to the new 
`queued_at`, the custom one keeps pointing at the old one.
   
   The registered timing only ever existed in the in-memory 
`DeadlineReference.TYPES` tuples of the process that ran the Dag file, so the 
scheduler could identify a queued-anchored deadline only by matching the 
built-in class name, which no custom class satisfies. The timing now travels 
with the reference and is stored on the alert row for the clear path to select 
on. The serializer adds it rather than `serialize_reference()`, because custom 
references are expected to override that method and an override would drop the 
field.
   
   `_recalculate_dagrun_queued_at_deadlines` has a second, unrelated bug with 
JSON-encoded intervals (#70370), so the tests store a numeric interval to stay 
clear of it.
   
   ## Compatibility
   
   Alerts serialized before this change carry no timing, so the built-in name 
comparison stays as a fallback until each Dag is parsed again.
   
   closes: #71747
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) 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]

Reply via email to