This is an automated email from the ASF dual-hosted git repository.
kaxilnaik 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 ade9fb185a9 refactor: remove `navbar_logo_text_color` (#49161)
ade9fb185a9 is described below
commit ade9fb185a92530001e23fb6391163a300463c36
Author: Guan Ming(Wesley) Chiu <[email protected]>
AuthorDate: Wed Apr 16 17:38:37 2025 +0800
refactor: remove `navbar_logo_text_color` (#49161)
lated Issue
- https://github.com/apache/airflow/issues/43519
## Why
The `navbar_logo_text_color` configuration is no longer used. Although it
was introduced in version 2.9.0, the current UI no longer relies on this value
to render the logo text color in the navbar. Keeping it adds unnecessary
complexity and maintenance overhead.
## How
This PR removes all code and configuration references to
`navbar_logo_text_color`, including:
- FastAPI response models and OpenAPI schema definitions
- UI TypeScript types and generated schemas
- `config.yml` setting and default value
- Mock data and unit test expectations
- Jinja global context variables
- Template references in the HTML markup
---
airflow-core/newsfragments/49161.significant.rst | 18 ++++++++++++++++++
.../api_fastapi/core_api/datamodels/ui/config.py | 1 -
.../api_fastapi/core_api/openapi/_private_ui.yaml | 4 ----
.../airflow/api_fastapi/core_api/routes/ui/config.py | 1 -
.../src/airflow/cli/commands/config_command.py | 4 ++++
airflow-core/src/airflow/config_templates/config.yml | 7 -------
.../src/airflow/ui/openapi-gen/requests/schemas.gen.ts | 5 -----
.../src/airflow/ui/openapi-gen/requests/types.gen.ts | 1 -
.../src/airflow/ui/src/mocks/handlers/config.ts | 1 -
.../unit/api_fastapi/core_api/routes/ui/test_config.py | 2 --
.../providers/fab/www/extensions/init_jinja_globals.py | 1 -
.../providers/fab/www/templates/appbuilder/navbar.html | 2 +-
providers/fab/tests/unit/fab/utils.py | 1 -
13 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/airflow-core/newsfragments/49161.significant.rst
b/airflow-core/newsfragments/49161.significant.rst
new file mode 100644
index 00000000000..549d27bdfe3
--- /dev/null
+++ b/airflow-core/newsfragments/49161.significant.rst
@@ -0,0 +1,18 @@
+Removed airflow configuration ``navbar_logo_text_color``
+
+* Types of change
+
+ * [ ] Dag changes
+ * [x] Config changes
+ * [ ] API changes
+ * [ ] CLI changes
+ * [ ] Behaviour changes
+ * [ ] Plugin changes
+ * [ ] Dependency changes
+ * [ ] Code interface changes
+
+* Migration rules needed
+
+ * ``airflow config lint``
+
+ * [x] ``webserver.navbar_logo_text_color``
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/config.py
b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/config.py
index f8cfb87d2f8..e7c39b3f3a1 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/config.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/config.py
@@ -28,7 +28,6 @@ class ConfigResponse(BaseModel):
navbar_text_color: str
navbar_hover_color: str
navbar_text_hover_color: str
- navbar_logo_text_color: str
page_size: int
auto_refresh_interval: int
hide_paused_dags_by_default: bool
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
b/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
index 5adaf9203a4..4c1c040e01f 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
+++ b/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
@@ -723,9 +723,6 @@ components:
navbar_text_hover_color:
type: string
title: Navbar Text Hover Color
- navbar_logo_text_color:
- type: string
- title: Navbar Logo Text Color
page_size:
type: integer
title: Page Size
@@ -773,7 +770,6 @@ components:
- navbar_text_color
- navbar_hover_color
- navbar_text_hover_color
- - navbar_logo_text_color
- page_size
- auto_refresh_interval
- hide_paused_dags_by_default
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
index 29fc2f8863d..11eefab1c85 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
@@ -42,7 +42,6 @@ WEBSERVER_CONFIG_KEYS = [
"navbar_text_color",
"navbar_hover_color",
"navbar_text_hover_color",
- "navbar_logo_text_color",
]
diff --git a/airflow-core/src/airflow/cli/commands/config_command.py
b/airflow-core/src/airflow/cli/commands/config_command.py
index 59f3fb28bbb..cdf07f9c2c2 100644
--- a/airflow-core/src/airflow/cli/commands/config_command.py
+++ b/airflow-core/src/airflow/cli/commands/config_command.py
@@ -546,6 +546,10 @@ CONFIGS_CHANGES = [
config=ConfigParameter("policy", "airflow_local_settings"),
renamed_to=ConfigParameter("policy", "task_policy"),
),
+ ConfigChange(
+ config=ConfigParameter("webserver", "navbar_logo_text_color"),
+ was_deprecated=False,
+ ),
# scheduler
ConfigChange(
config=ConfigParameter("scheduler", "dependency_detector"),
diff --git a/airflow-core/src/airflow/config_templates/config.yml
b/airflow-core/src/airflow/config_templates/config.yml
index 130ccc629b6..604b6bcdcfb 100644
--- a/airflow-core/src/airflow/config_templates/config.yml
+++ b/airflow-core/src/airflow/config_templates/config.yml
@@ -1810,13 +1810,6 @@ webserver:
type: string
example: ~
default: "#51504f"
- navbar_logo_text_color:
- description: |
- Define the color of the logo text
- version_added: 2.9.0
- type: string
- example: ~
- default: "#51504f"
default_wrap:
description: |
Default setting for wrap toggle on DAG code and TI log views.
diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
b/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
index 226a2701ba6..dbb2634d5c2 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
@@ -5750,10 +5750,6 @@ export const $ConfigResponse = {
type: "string",
title: "Navbar Text Hover Color",
},
- navbar_logo_text_color: {
- type: "string",
- title: "Navbar Logo Text Color",
- },
page_size: {
type: "integer",
title: "Page Size",
@@ -5816,7 +5812,6 @@ export const $ConfigResponse = {
"navbar_text_color",
"navbar_hover_color",
"navbar_text_hover_color",
- "navbar_logo_text_color",
"page_size",
"auto_refresh_interval",
"hide_paused_dags_by_default",
diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
index bb07b80843e..70139967f28 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
@@ -1445,7 +1445,6 @@ export type ConfigResponse = {
navbar_text_color: string;
navbar_hover_color: string;
navbar_text_hover_color: string;
- navbar_logo_text_color: string;
page_size: number;
auto_refresh_interval: number;
hide_paused_dags_by_default: boolean;
diff --git a/airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
b/airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
index ae3ce5e4317..79dfc7d634a 100644
--- a/airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
+++ b/airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
@@ -31,7 +31,6 @@ export const handlers: Array<HttpHandler> = [
instance_name_has_markup: false,
navbar_color: "#fff",
navbar_hover_color: "#eee",
- navbar_logo_text_color: "#51504f",
navbar_text_color: "#51504f",
navbar_text_hover_color: "#51504f",
page_size: 15,
diff --git
a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
index 60fa8748226..399b8658df6 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
@@ -27,7 +27,6 @@ mock_config_response = {
"navbar_text_color": "#51504f",
"navbar_hover_color": "#eee",
"navbar_text_hover_color": "#51504f",
- "navbar_logo_text_color": "#51504f",
"page_size": 100,
"auto_refresh_interval": 3,
"hide_paused_dags_by_default": False,
@@ -56,7 +55,6 @@ def mock_config_data():
"navbar_text_color": "#51504f",
"navbar_hover_color": "#eee",
"navbar_text_hover_color": "#51504f",
- "navbar_logo_text_color": "#51504f",
"page_size": "100",
"auto_refresh_interval": "3",
"hide_paused_dags_by_default": "false",
diff --git
a/providers/fab/src/airflow/providers/fab/www/extensions/init_jinja_globals.py
b/providers/fab/src/airflow/providers/fab/www/extensions/init_jinja_globals.py
index 49cb637f724..5929a40d8f5 100644
---
a/providers/fab/src/airflow/providers/fab/www/extensions/init_jinja_globals.py
+++
b/providers/fab/src/airflow/providers/fab/www/extensions/init_jinja_globals.py
@@ -56,7 +56,6 @@ def init_jinja_globals(app, enable_plugins: bool):
"navbar_text_color": conf.get("webserver", "NAVBAR_TEXT_COLOR"),
"navbar_hover_color": conf.get("webserver", "NAVBAR_HOVER_COLOR"),
"navbar_text_hover_color": conf.get("webserver",
"NAVBAR_TEXT_HOVER_COLOR"),
- "navbar_logo_text_color": conf.get("webserver",
"NAVBAR_LOGO_TEXT_COLOR"),
"airflow_version": airflow_version,
"git_version": git_version,
"show_plugin_message": enable_plugins,
diff --git
a/providers/fab/src/airflow/providers/fab/www/templates/appbuilder/navbar.html
b/providers/fab/src/airflow/providers/fab/www/templates/appbuilder/navbar.html
index 76cbcd8e2dd..74f897f60ad 100644
---
a/providers/fab/src/airflow/providers/fab/www/templates/appbuilder/navbar.html
+++
b/providers/fab/src/airflow/providers/fab/www/templates/appbuilder/navbar.html
@@ -41,7 +41,7 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.4028
16.9752C6.32267 15.0072 10.1207 14.0942 17.953 17.867C15.2128 11.7354 11.6107
9.58661 10.5795 10.6437L4.4028 16.9752Z" fill="#0cb6ff"/>
<path d="M17.9649 18.6209C18.3825 18.6157 18.7169 18.273 18.7117
17.8553C18.7065 17.4377 18.3638 17.1034 17.9462 17.1085C17.5285 17.1137 17.1942
17.4564 17.1994 17.8741C17.2045 18.2917 17.5473 18.626 17.9649 18.6209Z"
fill="#4a4848"/>
</g>
- <path d="M38.9349 24.0977C38.8442 24.0977 38.765 24.0636 38.6969
23.9957C38.629 23.9276 38.5949 23.8484 38.5949 23.7577C38.5949 23.6669 38.6006
23.6048 38.612 23.5707L42.8273 12.5738C42.9178 12.3245 43.0992 12.1999 43.3712
12.1999H44.5269C44.7988 12.1999 44.98 12.3245 45.0708 12.5738L49.269
23.5707L49.3029 23.7577C49.3029 23.8484 49.269 23.9276 49.2009 23.9957C49.133
24.0636 49.0536 24.0977 48.9631 24.0977H48.0962C47.9715 24.0977 47.8753 24.0693
47.8072 24.0128C47.7393 23.9447 [...]
+ <path d="M38.9349 24.0977C38.8442 24.0977 38.765 24.0636 38.6969
23.9957C38.629 23.9276 38.5949 23.8484 38.5949 23.7577C38.5949 23.6669 38.6006
23.6048 38.612 23.5707L42.8273 12.5738C42.9178 12.3245 43.0992 12.1999 43.3712
12.1999H44.5269C44.7988 12.1999 44.98 12.3245 45.0708 12.5738L49.269
23.5707L49.3029 23.7577C49.3029 23.8484 49.269 23.9276 49.2009 23.9957C49.133
24.0636 49.0536 24.0977 48.9631 24.0977H48.0962C47.9715 24.0977 47.8753 24.0693
47.8072 24.0128C47.7393 23.9447 [...]
</svg>
</a>
</div>
diff --git a/providers/fab/tests/unit/fab/utils.py
b/providers/fab/tests/unit/fab/utils.py
index d68de253c66..f52b898b8c5 100644
--- a/providers/fab/tests/unit/fab/utils.py
+++ b/providers/fab/tests/unit/fab/utils.py
@@ -217,7 +217,6 @@ class _TemplateWithContext(NamedTuple):
"navbar_text_color",
"navbar_hover_color",
"navbar_text_hover_color",
- "navbar_logo_text_color",
"airflow_version",
"git_version",
"k8s_or_k8scelery_executor",