Copilot commented on code in PR #70881:
URL: https://github.com/apache/airflow/pull/70881#discussion_r4743728149
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -1540,7 +1547,8 @@ def _build_schedulable_tis_query(
)
.order_by(
-ranked_query.c.priority_weight_for_ordering,
- ranked_query.c.logical_date_for_ordering,
+ ranked_query.c.run_date_for_ordering,
+ ranked_query.c.dag_run_id_for_ordering,
Review Comment:
The new ordering tests create only two candidates, below the four-candidate
limit for `max_tis=1`, so they still pass if this candidate-stage ordering is
reverted: the outer query sorts both surviving rows correctly. Add regression
cases with more than `CANDIDATE_BATCHES * max_tis` eligible runs and
conflicting region-index order, so the earliest `run_after` falls outside the
old ordering's cutoff. Include an equal-date case for the `DagRun.id`
tie-breaker, and verify that reverting only the candidate-stage ordering fails
these tests.
--
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]