hkc-8010 commented on code in PR #70370:
URL: https://github.com/apache/airflow/pull/70370#discussion_r3838213895


##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -248,10 +248,26 @@ def _recalculate_dagrun_queued_at_deadlines(
     if not results:
         return
 
+    # Local imports to avoid a circular import between models and 
serialization.
+    from airflow.sdk.definitions.deadline import VariableInterval

Review Comment:
   Removed. `taskinstance.py` no longer imports anything from the SDK. The 
decode and the interval resolution now live in `serialization/decoders.py` as 
`decode_deadline_alert_model()` and `resolve_deadline_alert_interval()`, and 
`SerializedDAG._process_dagrun_deadline_alerts` was doing the same two steps 
inline, so it calls them too and drops its own `VariableInterval` import.
   
   Net effect on the counts introduced in #71212: `definitions/dag.py` goes 2 
to 1, `decoders.py` stays at 2, `taskinstance.py` stays at 1.



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