Skip to content

Remove remainder of webserver config section #50899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
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 @@ -31,8 +31,6 @@ class ConfigResponse(BaseModel):
enable_swagger_ui: bool
require_confirmation_dag_change: bool
default_wrap: bool
audit_view_excluded_events: str
audit_view_included_events: str
test_connection: str
dashboard_alert: list[UIAlert]
show_external_log_redirect: bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,12 +761,6 @@ components:
default_wrap:
type: boolean
title: Default Wrap
audit_view_excluded_events:
type: string
title: Audit View Excluded Events
audit_view_included_events:
type: string
title: Audit View Included Events
test_connection:
type: string
title: Test Connection
Expand All @@ -792,8 +786,6 @@ components:
- enable_swagger_ui
- require_confirmation_dag_change
- default_wrap
- audit_view_excluded_events
- audit_view_included_events
- test_connection
- dashboard_alert
- show_external_log_redirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ def get_configs() -> ConfigResponse:

task_log_reader = TaskLogReader()
additional_config: dict[str, Any] = {
"instance_name": conf.get("webserver", "instance_name", fallback="Airflow"),
"audit_view_included_events": conf.get("webserver", "audit_view_included_events", fallback=""),
"audit_view_excluded_events": conf.get("webserver", "audit_view_excluded_events", fallback=""),
"instance_name": conf.get("api", "instance_name", fallback="Airflow"),
"test_connection": conf.get("core", "test_connection", fallback="Disabled"),
"dashboard_alert": DASHBOARD_UIALERTS,
"show_external_log_redirect": task_log_reader.supports_external_link,
Expand Down
10 changes: 10 additions & 0 deletions airflow-core/src/airflow/cli/commands/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ def message(self) -> str | None:
ConfigChange(
config=ConfigParameter("webserver", "cookie_samesite"),
),
ConfigChange(
config=ConfigParameter("webserver", "audit_view_included_events"),
),
ConfigChange(
config=ConfigParameter("webserver", "audit_view_excluded_events"),
),
ConfigChange(
config=ConfigParameter("webserver", "instance_name"),
renamed_to=ConfigParameter("api", "instance_name"),
),
ConfigChange(
config=ConfigParameter("webserver", "update_fab_perms"),
renamed_to=ConfigParameter("fab", "update_fab_perms"),
Expand Down
35 changes: 7 additions & 28 deletions airflow-core/src/airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,13 @@ secrets:
api:
description: ~
options:
instance_name:
description: |
Sets a custom page title for the DAGs overview page and site title for all pages
version_added: 2.1.0
type: string
example: ~
default:
enable_swagger_ui:
description: |
Boolean for running SwaggerUI in the webserver.
Expand Down Expand Up @@ -1766,34 +1773,6 @@ operators:
type: string
example: ~
default: "default"
webserver:
description: ~
options:
instance_name:
description: |
Sets a custom page title for the DAGs overview page and site title for all pages
version_added: 2.1.0
type: string
example: ~
default:
audit_view_excluded_events:
description: |
Comma separated string of view events to exclude from dag audit view.
All other events will be added minus the ones passed here.
The audit logs in the db will not be affected by this parameter.
version_added: 2.3.0
type: string
example: "cli_task_run,running,success"
default: ~
audit_view_included_events:
description: |
Comma separated string of view events to include in dag audit view.
If passed, only these events will populate the dag audit view.
The audit logs in the db will not be affected by this parameter.
version_added: 2.3.0
type: string
example: "dagrun_cleared,failed"
default: ~
email:
description: |
Configuration email backend and whether to
Expand Down
1 change: 1 addition & 0 deletions airflow-core/src/airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ def sensitive_config_values(self) -> set[tuple[str, str]]:
("api", "default_wrap"): ("webserver", "default_wrap", "3.1.0"),
("api", "auto_refresh_interval"): ("webserver", "auto_refresh_interval", "3.1.0"),
("api", "require_confirmation_dag_change"): ("webserver", "require_confirmation_dag_change", "3.1.0"),
("api", "instance_name"): ("webserver", "instance_name", "3.1.0"),
}

# A mapping of new section -> (old section, since_version).
Expand Down
10 changes: 0 additions & 10 deletions airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6030,14 +6030,6 @@ export const $ConfigResponse = {
type: "boolean",
title: "Default Wrap",
},
audit_view_excluded_events: {
type: "string",
title: "Audit View Excluded Events",
},
audit_view_included_events: {
type: "string",
title: "Audit View Included Events",
},
test_connection: {
type: "string",
title: "Test Connection",
Expand Down Expand Up @@ -6074,8 +6066,6 @@ export const $ConfigResponse = {
"enable_swagger_ui",
"require_confirmation_dag_change",
"default_wrap",
"audit_view_excluded_events",
"audit_view_included_events",
"test_connection",
"dashboard_alert",
"show_external_log_redirect",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1503,8 +1503,6 @@ export type ConfigResponse = {
enable_swagger_ui: boolean;
require_confirmation_dag_change: boolean;
default_wrap: boolean;
audit_view_excluded_events: string;
audit_view_included_events: string;
test_connection: string;
dashboard_alert: Array<UIAlert>;
show_external_log_redirect: boolean;
Expand Down
2 changes: 0 additions & 2 deletions airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import { http, HttpResponse, type HttpHandler } from "msw";
export const handlers: Array<HttpHandler> = [
http.get("/ui/config", () =>
HttpResponse.json({
audit_view_excluded_events: "gantt,landing_times,tries,duration,calendar,graph,grid,tree,tree_data",
audit_view_included_events: "",
auto_refresh_interval: 3,
default_wrap: false,
enable_swagger_ui: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
"enable_swagger_ui": True,
"require_confirmation_dag_change": False,
"default_wrap": False,
"audit_view_excluded_events": "",
"audit_view_included_events": "",
"test_connection": "Disabled",
"dashboard_alert": [],
"show_external_log_redirect": False,
Expand All @@ -46,7 +44,7 @@ def mock_config_data():
"""
with conf_vars(
{
("webserver", "instance_name"): "Airflow",
("api", "instance_name"): "Airflow",
("api", "enable_swagger_ui"): "true",
("api", "hide_paused_dags_by_default"): "true",
("api", "page_size"): "100",
Expand Down
Loading