Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def to_orm(self, select: Select) -> Select:
return select.limit(self.value)

@classmethod
def depends(cls, limit: NonNegativeInt = conf.getint("api", "page_size")) -> LimitFilter:
def depends(cls, limit: NonNegativeInt = conf.getint("api", "fallback_page_limit")) -> LimitFilter:
return cls().set_value(min(limit, conf.getint("api", "maximum_page_limit")))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class ConfigResponse(BaseModel):
"""configuration serializer."""

page_size: int
fallback_page_limit: int
auto_refresh_interval: int
hide_paused_dags_by_default: bool
instance_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1338,9 +1338,9 @@ components:
description: Represents a summary of DAG runs for a specific calendar time range.
ConfigResponse:
properties:
page_size:
fallback_page_limit:
type: integer
title: Page Size
title: Fallback Page Limit
auto_refresh_interval:
type: integer
title: Auto Refresh Interval
Expand Down Expand Up @@ -1384,7 +1384,7 @@ components:
title: Multi Team
type: object
required:
- page_size
- fallback_page_limit
- auto_refresh_interval
- hide_paused_dags_by_default
- instance_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
API_CONFIG_KEYS = [
"enable_swagger_ui",
"hide_paused_dags_by_default",
"page_size",
"fallback_page_limit",
"default_wrap",
"auto_refresh_interval",
"require_confirmation_dag_change",
Expand Down
5 changes: 5 additions & 0 deletions airflow-core/src/airflow/cli/commands/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,11 @@ def message(self) -> str | None:
config=ConfigParameter("webserver", "navbar_logo_text_color"),
was_deprecated=False,
),
# api
ConfigChange(
config=ConfigParameter("api", "page_size"),
renamed_to=ConfigParameter("api", "fallback_page_limit"),
),
# scheduler
ConfigChange(
config=ConfigParameter("scheduler", "dependency_detector"),
Expand Down
7 changes: 0 additions & 7 deletions airflow-core/src/airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,6 @@ api:
type: boolean
example: ~
default: "False"
page_size:
description: |
Consistent page size across all listing views in the UI
version_added: ~
type: integer
example: ~
default: "50"
default_wrap:
description: |
Default setting for wrap toggle on DAG code and TI log views.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7127,9 +7127,9 @@ export const $CalendarTimeRangeResponse = {

export const $ConfigResponse = {
properties: {
page_size: {
fallback_page_limit: {
type: 'integer',
title: 'Page Size'
title: 'Fallback Page Limit'
},
auto_refresh_interval: {
type: 'integer',
Expand Down Expand Up @@ -7197,7 +7197,7 @@ export const $ConfigResponse = {
}
},
type: 'object',
required: ['page_size', 'auto_refresh_interval', 'hide_paused_dags_by_default', 'instance_name', 'enable_swagger_ui', 'require_confirmation_dag_change', 'default_wrap', 'test_connection', 'dashboard_alert', 'show_external_log_redirect', 'theme', 'multi_team'],
required: ['fallback_page_limit', 'auto_refresh_interval', 'hide_paused_dags_by_default', 'instance_name', 'enable_swagger_ui', 'require_confirmation_dag_change', 'default_wrap', 'test_connection', 'dashboard_alert', 'show_external_log_redirect', 'theme', 'multi_team'],
title: 'ConfigResponse',
description: 'configuration serializer.'
} as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ export type state = 'queued' | 'running' | 'success' | 'failed' | 'planned';
* configuration serializer.
*/
export type ConfigResponse = {
page_size: number;
fallback_page_limit: number;
auto_refresh_interval: number;
hide_paused_dags_by_default: boolean;
instance_name: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useTableURLState = (defaultState?: Partial<TableState>) => {
[],
);

const pageSize = useConfig("page_size") as number;
const pageSize = useConfig("fallback_page_limit") as number;

const defaultTableState = {
pagination: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

expected_config_response = {
"page_size": 100,
"fallback_page_limit": 100,
"auto_refresh_interval": 3,
"hide_paused_dags_by_default": True,
"instance_name": "Airflow",
Expand All @@ -72,7 +72,7 @@ def mock_config_data():
("api", "instance_name"): "Airflow",
("api", "enable_swagger_ui"): "true",
("api", "hide_paused_dags_by_default"): "true",
("api", "page_size"): "100",
("api", "fallback_page_limit"): "100",
("api", "default_wrap"): "false",
("api", "auto_refresh_interval"): "3",
("api", "require_confirmation_dag_change"): "false",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class AirflowConfigParser(ConfigParser):
("api", "instance_name"): ("webserver", "instance_name", "3.1.0"),
("api", "log_config"): ("api", "access_logfile", "3.1.0"),
("scheduler", "ti_metrics_interval"): ("scheduler", "running_metrics_interval", "3.2.0"),
("api", "fallback_page_limit"): ("api", "page_size", "3.2.0"),
}

# A mapping of new section -> (old section, since_version).
Expand Down