uranusjr commented on code in PR #64109:
URL: https://github.com/apache/airflow/pull/64109#discussion_r3412798040
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -713,8 +731,12 @@ def get_queued_dag_runs_to_set_running(cls, session:
Session) -> ScalarResult[Da
# the one done in this query verifies that the dag is not
maxed out
# it could return many more dag runs than runnable if there is
even
# capacity for 1. this could be improved.
- coalesce(running_drs.c.num_running, text("0"))
- < coalesce(Backfill.max_active_runs, DagModel.max_active_runs),
+ available_dagruns_rn.c.rn
+ <= coalesce(
+ Backfill.max_active_runs,
+ DagModel.max_active_runs,
Review Comment:
I think theoratically it can’t be null but in practice it’s unclear whether
an installation upgraded all the way from very old Airflow would have a null
value in the column. It would be safer to consider null IMO.
--
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]