You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jscheffl (via GitHub)" <gi...@apache.org> on 2025/06/21 11:16:09 UTC
[PR] Remove FAB dependency from Edge3 Provider [airflow]
jscheffl opened a new pull request, #51995:
URL: https://github.com/apache/airflow/pull/51995
In regards of support of Python 3.13 we see that edge3 provider needs to be excluded for the moment as FAB is not ready for Python 3.13. See #46891
FAB dependency was only used in the Plugin for the UI which anyway is limited to Airflow 2.x atm as plugin support in Airflow 3 UI is still WIP.
This PR reworks the logic in the UI Plugin such that the FAB dependency is removed - in Airflow 2.x this was belonging into the core and only for Airflow 3 the auth manager stuff was moved to FAB... so actually the dependency in the provider is not needed.
The change looks big but actually it is just moving existing code into conditional blocks such that auth manager code is only needed in Airflow 2 and Airflow 3 Plugin code now loads only API server backend needed.
@potiuk Can you be my reviewer for the change?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove FAB dependency from Edge3 Provider [airflow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #51995:
URL: https://github.com/apache/airflow/pull/51995#discussion_r2160020452
##########
providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:
##########
@@ -17,184 +17,179 @@
from __future__ import annotations
-import re
-from datetime import datetime, timedelta
-from pathlib import Path
-from typing import TYPE_CHECKING, Any
-
-from flask import Blueprint, redirect, request, url_for
-from flask_appbuilder import BaseView, expose
-from markupsafe import Markup
-from sqlalchemy import select
-
from airflow.configuration import conf
Review Comment:
The imports `conf` and `AirflowConfigException` are not used in the Airflow 3.0+ branch and can be removed to eliminate dead code.
##########
providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:
##########
@@ -209,21 +204,19 @@ class EdgeExecutorPlugin(AirflowPlugin):
name = "edge_executor"
if EDGE_EXECUTOR_ACTIVE:
- appbuilder_views = [
- {
- "name": "Edge Worker Jobs",
- "category": "Admin",
- "view": EdgeWorkerJobs(),
- },
- {
- "name": "Edge Worker Hosts",
- "category": "Admin",
- "view": EdgeWorkerHosts(),
- },
- ]
-
if AIRFLOW_V_3_0_PLUS:
fastapi_apps = [_get_api_endpoint()]
Review Comment:
When AIRFLOW_V_3_0_PLUS is true, neither `appbuilder_views` nor `flask_blueprints` are defined on `EdgeExecutorPlugin`, which will raise attribute errors when those properties are accessed. Consider initializing them to empty lists in the 3.0+ branch.
```suggestion
fastapi_apps = [_get_api_endpoint()]
appbuilder_views = []
flask_blueprints = []
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove FAB dependency from Edge3 Provider [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #51995:
URL: https://github.com/apache/airflow/pull/51995#discussion_r2160024133
##########
providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:
##########
@@ -17,184 +17,179 @@
from __future__ import annotations
-import re
-from datetime import datetime, timedelta
-from pathlib import Path
-from typing import TYPE_CHECKING, Any
-
-from flask import Blueprint, redirect, request, url_for
-from flask_appbuilder import BaseView, expose
-from markupsafe import Markup
-from sqlalchemy import select
-
from airflow.configuration import conf
Review Comment:
Sorry, Copilot, this is wrong unfortunately. These imports are used in line 197+198 which is outside of the Airflow 3.0+ branch check. So this needs still a global import..
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove FAB dependency from Edge3 Provider [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #51995:
URL: https://github.com/apache/airflow/pull/51995
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove FAB dependency from Edge3 Provider [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #51995:
URL: https://github.com/apache/airflow/pull/51995#discussion_r2160023675
##########
providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:
##########
@@ -209,21 +204,19 @@ class EdgeExecutorPlugin(AirflowPlugin):
name = "edge_executor"
if EDGE_EXECUTOR_ACTIVE:
- appbuilder_views = [
- {
- "name": "Edge Worker Jobs",
- "category": "Admin",
- "view": EdgeWorkerJobs(),
- },
- {
- "name": "Edge Worker Hosts",
- "category": "Admin",
- "view": EdgeWorkerHosts(),
- },
- ]
-
if AIRFLOW_V_3_0_PLUS:
fastapi_apps = [_get_api_endpoint()]
Review Comment:
Thanks Copilot for this feedback. But the base class is initialized with empty lists, so no explicit handling in the EdgeExecutorPlugin needed.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org