roykoand commented on code in PR #73105:
URL: https://github.com/apache/airflow/pull/73105#discussion_r4002682078


##########
airflow-core/src/airflow/cli/cli_config.py:
##########
@@ -294,7 +294,7 @@ def string_lower_type(val):
 
 # list_jobs
 ARG_DAG_ID_OPT = Arg(("-d", "--dag-id"), help="The id of the dag")
-ARG_LIMIT = Arg(("--limit",), help="Return a limited number of records")
+ARG_LIMIT = Arg(("--limit",), type=positive_int(allow_zero=False), 
help="Return a limited number of records")

Review Comment:
   `0` shouldn't be allowed after all. Checking the other 
`positive_int(allow_zero=...)` call sites in this same file: `allow_zero=True` 
is only used where `0` has a *documented* special meaning (`ARG_JOB_LIMIT`: "To 
disable limit, set 0"; `ARG_DB_RETRY`: `default=0` meaning don't retry). 
`ARG_LIMIT`'s help text says nothing like that, and it's really in the same 
"how many things to show" category as `ARG_NUM_EXECUTIONS`/`ARG_CAPACITY`, both 
of which use `allow_zero=False` — returning zero record with "No data found"  
isn't a useful query, it's a no-op nobody (?) actually wants.



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