kaxil commented on code in PR #64294:
URL: https://github.com/apache/airflow/pull/64294#discussion_r3125351302


##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -2568,6 +2568,17 @@ scheduler:
       type: integer
       default: "20"
       see_also: ":ref:`scheduler:ha:tunables`"
+    max_new_dagruns_per_loop_to_schedule:
+      description: |
+        How many NEW dagruns should be scheduled and examined (and locked) 
when scheduling
+        and queuing tasks.
+        If set, select `max_dagruns_per_loop_to_schedule` old dagruns (that 
have been
+        examined before)
+        And `max_new_dagruns_per_loop_to_schedule` new dagruns (that have not 
yet been examined).
+      example: ~
+      version_added: 3.2.2
+      type: integer
+      default: "0"

Review Comment:
   Good point, the convention in this file is genuinely mixed:
   
   - `parallelism`: description says "must be larger or equal 1" (0 is invalid)
   - `max_consecutive_failed_dag_runs_per_dag`: default `0` explicitly means 
*disabled*
   - `task_instance_heartbeat_sec` / `max_tis_per_query`: default `0` means 
*fall back to another setting*
   - `num_runs`: uses `-1` for unlimited
   
   So `0 = disabled` does have precedent 
(`max_consecutive_failed_dag_runs_per_dag`), but only because that description 
spells it out. Lowest-churn fix here is the same: add "Set to `0` to disable 
this second query" to the description. I left a separate comment on the 
description block that could fold this in.



##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -2568,6 +2568,17 @@ scheduler:
       type: integer
       default: "20"
       see_also: ":ref:`scheduler:ha:tunables`"
+    max_new_dagruns_per_loop_to_schedule:
+      description: |
+        How many NEW dagruns should be scheduled and examined (and locked) 
when scheduling
+        and queuing tasks.
+        If set, select `max_dagruns_per_loop_to_schedule` old dagruns (that 
have been
+        examined before)
+        And `max_new_dagruns_per_loop_to_schedule` new dagruns (that have not 
yet been examined).
+      example: ~
+      version_added: 3.2.2
+      type: integer
+      default: "0"

Review Comment:
   The convention in this file is genuinely mixed:
   
   - `parallelism`: description says "must be larger or equal 1" (0 is invalid)
   - `max_consecutive_failed_dag_runs_per_dag`: default `0` explicitly means 
*disabled*
   - `task_instance_heartbeat_sec` / `max_tis_per_query`: default `0` means 
*fall back to another setting*
   - `num_runs`: uses `-1` for unlimited
   
   So `0 = disabled` does have precedent 
(`max_consecutive_failed_dag_runs_per_dag`), but only because that description 
spells it out. Lowest-churn fix here is the same: add "Set to `0` to disable 
this second query" to the description. I left a separate comment on the 
description block that could fold this in.



-- 
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]

Reply via email to