amoghrajesh commented on code in PR #70370:
URL: https://github.com/apache/airflow/pull/70370#discussion_r4215986263


##########
airflow-core/tests/unit/models/test_dagrun.py:
##########
@@ -1563,6 +1563,25 @@ def test_dagrun_deadline_variable_interval_stable(self, 
_, mock_get, session, de
         deadline = session.execute(select(Deadline)).scalars().one_or_none()
         assert deadline.deadline_time == first_deadline_time
 
+    @mock.patch.object(Deadline, "prune_deadlines")
+    def test_dagrun_deadline_variable_interval_uses_callers_session(self, _, 
session, deadline_test_dag):
+        """DagRun creation resolves the interval inside an open transaction, 
so the caller's
+        session has to reach ``Variable.get``. See 
``resolve_deadline_alert_interval()``."""

Review Comment:
   ```suggestion
          """Caller's session must reach Variable.get."""
   ```
   
   nit, the comment volume is large



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