This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 228d79c1b3 better description for limit in api (#29773)
228d79c1b3 is described below
commit 228d79c1b3e11ecfbff5a27c900f9d49a84ad365
Author: Bowrna <[email protected]>
AuthorDate: Sun Feb 26 21:49:51 2023 +0530
better description for limit in api (#29773)
---
airflow/config_templates/config.yml | 11 ++++++-----
airflow/config_templates/default_airflow.cfg | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/airflow/config_templates/config.yml
b/airflow/config_templates/config.yml
index eed20e351c..a61426e6d0 100644
--- a/airflow/config_templates/config.yml
+++ b/airflow/config_templates/config.yml
@@ -1004,17 +1004,18 @@ api:
default: "airflow.api.auth.backend.session"
maximum_page_limit:
description: |
- Used to set the maximum page limit for API requests
+ Used to set the maximum page limit for API requests. If limit passed
as param
+ is greater than maximum page limit, it will be ignored and maximum
page limit value
+ will be set as the limit
version_added: 2.0.0
type: integer
example: ~
default: "100"
fallback_page_limit:
description: |
- Used to set the default page limit when limit is zero. A default limit
- of 100 is set on OpenApi spec. However, this particular default limit
- only work when limit is set equal to zero(0) from API requests.
- If no limit is supplied, the OpenApi spec default is used.
+ Used to set the default page limit when limit param is zero or not
provided in API
+ requests. Otherwise if positive integer is passed in the API requests
as limit, the
+ smallest number of user given limit or maximum page limit is taken as
limit.
type: integer
example: ~
version_added: 2.0.0
diff --git a/airflow/config_templates/default_airflow.cfg
b/airflow/config_templates/default_airflow.cfg
index a4b03c8764..4a8eeeda5e 100644
--- a/airflow/config_templates/default_airflow.cfg
+++ b/airflow/config_templates/default_airflow.cfg
@@ -550,13 +550,14 @@ enable_experimental_api = False
# ("airflow.api.auth.backend.default" allows all requests for historic reasons)
auth_backends = airflow.api.auth.backend.session
-# Used to set the maximum page limit for API requests
+# Used to set the maximum page limit for API requests. If limit passed as param
+# is greater than maximum page limit, it will be ignored and maximum page
limit value
+# will be set as the limit
maximum_page_limit = 100
-# Used to set the default page limit when limit is zero. A default limit
-# of 100 is set on OpenApi spec. However, this particular default limit
-# only work when limit is set equal to zero(0) from API requests.
-# If no limit is supplied, the OpenApi spec default is used.
+# Used to set the default page limit when limit param is zero or not provided
in API
+# requests. Otherwise if positive integer is passed in the API requests as
limit, the
+# smallest number of user given limit or maximum page limit is taken as limit.
fallback_page_limit = 100
# The intended audience for JWT token credentials used for authorization. This
value must match on the client and server sides. If empty, audience will not be
tested.