Lee-W commented on code in PR #61464:
URL: https://github.com/apache/airflow/pull/61464#discussion_r2839857654
##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -221,14 +222,23 @@ def validate_sort_ordinal(self, key: str, val: int) ->
int:
def _get_latest_dag_run_row_query(*, dag_id: str, info: DagRunInfo, session:
Session):
from airflow.models import DagRun
+ if info.partition_key:
+ return (
+ select(DagRun)
+ .where(
+ DagRun.dag_id == dag_id,
+ DagRun.partition_key == info.partition_key,
+ )
+ .order_by(nulls_first(DagRun.start_date.desc(), session=session))
Review Comment:
Yep, just fixed it and add a unit test to catch it
--
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]