uranusjr commented on code in PR #46460:
URL: https://github.com/apache/airflow/pull/46460#discussion_r1952069016
##########
airflow/models/dag.py:
##########
@@ -188,10 +188,10 @@ def get_last_dagrun(dag_id, session,
include_externally_triggered=False):
Overridden DagRuns are ignored.
"""
DR = DagRun
- query = select(DR).where(DR.dag_id == dag_id, DR.logical_date.is_not(None))
+ query = select(DR).where(DR.dag_id == dag_id, DR.run_after.is_not(None))
if not include_externally_triggered:
query = query.where(DR.external_trigger == expression.false())
- query = query.order_by(DR.logical_date.desc())
+ query = query.order_by(DR.run_after.desc())
Review Comment:
We shouldn’t need to change this, filtering by logical date is correct here.
We should review usages of this function if it causes problems, but “last”
should be defined by logical date according to the AIP document.
--
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]