uranusjr commented on code in PR #51638:
URL: https://github.com/apache/airflow/pull/51638#discussion_r2141931684


##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -220,9 +220,12 @@ class DagRunQueuedAtDeadline(BaseDeadlineReference):
 
         required_kwargs = {"dag_id"}
 
-        def _evaluate_with(self, **kwargs: Any) -> datetime:
+        @provide_session
+        def _evaluate_with(self, session=NEW_SESSION, **kwargs: Any) -> 
datetime:
             from airflow.models import DagRun
 
+            session.flush()

Review Comment:
   It’s likely better to remove `provide_session` (and always pass in a session 
object), and flush the session before calling this function instead.



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