ferruzzi commented on code in PR #51638:
URL: https://github.com/apache/airflow/pull/51638#discussion_r2141928242
##########
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:
This could be the wrong place for this flush. Unit tests had a race
condition where the queued_at value was not yet written to the db before this
tried to query for it, so I added this to ensure that it is always flushed
before checking?
--
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]