apache-airflow-providers-edge3 1.3.0rc1__py3-none-any.whl → 1.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/edge3/__init__.py +1 -1
- airflow/providers/edge3/cli/api_client.py +9 -3
- airflow/providers/edge3/cli/worker.py +16 -10
- airflow/providers/edge3/example_dags/win_test.py +1 -1
- airflow/providers/edge3/executors/edge_executor.py +37 -6
- airflow/providers/edge3/models/edge_job.py +18 -15
- airflow/providers/edge3/models/edge_logs.py +11 -8
- airflow/providers/edge3/models/edge_worker.py +44 -26
- airflow/providers/edge3/openapi/v2-edge-generated.yaml +13 -33
- airflow/providers/edge3/plugins/edge_executor_plugin.py +26 -19
- airflow/providers/edge3/plugins/www/dist/main.umd.cjs +14 -66
- airflow/providers/edge3/plugins/www/openapi-gen/requests/schemas.gen.ts +4 -4
- airflow/providers/edge3/plugins/www/openapi-gen/requests/services.gen.ts +10 -10
- airflow/providers/edge3/plugins/www/openapi-gen/requests/types.gen.ts +21 -21
- airflow/providers/edge3/plugins/www/package.json +26 -26
- airflow/providers/edge3/plugins/www/pnpm-lock.yaml +1637 -1683
- airflow/providers/edge3/plugins/www/src/components/ui/Alert.tsx +0 -1
- airflow/providers/edge3/plugins/www/src/layouts/EdgeLayout.tsx +9 -10
- airflow/providers/edge3/plugins/www/src/layouts/NavTabs.tsx +1 -8
- airflow/providers/edge3/plugins/www/src/main.tsx +5 -4
- airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx +7 -8
- airflow/providers/edge3/plugins/www/src/theme.ts +0 -1
- airflow/providers/edge3/plugins/www/src/utils/index.ts +0 -1
- airflow/providers/edge3/plugins/www/vite.config.ts +2 -1
- airflow/providers/edge3/version_compat.py +5 -0
- airflow/providers/edge3/worker_api/routes/_v2_compat.py +1 -0
- airflow/providers/edge3/worker_api/routes/jobs.py +5 -6
- airflow/providers/edge3/worker_api/routes/ui.py +8 -3
- airflow/providers/edge3/worker_api/routes/worker.py +9 -5
- {apache_airflow_providers_edge3-1.3.0rc1.dist-info → apache_airflow_providers_edge3-1.4.1.dist-info}/METADATA +35 -14
- {apache_airflow_providers_edge3-1.3.0rc1.dist-info → apache_airflow_providers_edge3-1.4.1.dist-info}/RECORD +33 -34
- airflow/providers/edge3/plugins/www/src/utils/tokenHandler.ts +0 -51
- {apache_airflow_providers_edge3-1.3.0rc1.dist-info → apache_airflow_providers_edge3-1.4.1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_edge3-1.3.0rc1.dist-info → apache_airflow_providers_edge3-1.4.1.dist-info}/entry_points.txt +0 -0
|
@@ -66,8 +66,7 @@ else:
|
|
|
66
66
|
from sqlalchemy import select
|
|
67
67
|
|
|
68
68
|
from airflow.auth.managers.models.resource_details import AccessView
|
|
69
|
-
from airflow.
|
|
70
|
-
from airflow.utils.state import State
|
|
69
|
+
from airflow.utils.state import State, TaskInstanceState
|
|
71
70
|
from airflow.utils.yaml import safe_load
|
|
72
71
|
from airflow.www.auth import has_access_view
|
|
73
72
|
|
|
@@ -227,6 +226,22 @@ else:
|
|
|
227
226
|
RUNNING_ON_APISERVER = "gunicorn" in sys.argv[0] and "airflow-webserver" in sys.argv
|
|
228
227
|
|
|
229
228
|
|
|
229
|
+
def _get_base_url_path(path: str) -> str:
|
|
230
|
+
"""Construct URL path with webserver base_url prefix."""
|
|
231
|
+
base_url = conf.get("api", "base_url", fallback="/")
|
|
232
|
+
# Extract pathname from base_url (handles both full URLs and path-only)
|
|
233
|
+
if base_url.startswith(("http://", "https://")):
|
|
234
|
+
from urllib.parse import urlparse
|
|
235
|
+
|
|
236
|
+
base_path = urlparse(base_url).path
|
|
237
|
+
else:
|
|
238
|
+
base_path = base_url
|
|
239
|
+
|
|
240
|
+
# Normalize paths: remove trailing slash from base, ensure leading slash on path
|
|
241
|
+
base_path = base_path.rstrip("/")
|
|
242
|
+
return base_path + path
|
|
243
|
+
|
|
244
|
+
|
|
230
245
|
class EdgeExecutorPlugin(AirflowPlugin):
|
|
231
246
|
"""EdgeExecutor Plugin - provides API endpoints for Edge Workers in Webserver."""
|
|
232
247
|
|
|
@@ -236,31 +251,23 @@ class EdgeExecutorPlugin(AirflowPlugin):
|
|
|
236
251
|
fastapi_apps = [_get_api_endpoint()]
|
|
237
252
|
react_apps = [
|
|
238
253
|
{
|
|
239
|
-
"name": "Edge
|
|
240
|
-
"bundle_url": "/edge_worker/static/main.umd.cjs",
|
|
254
|
+
"name": "Edge Executor",
|
|
255
|
+
"bundle_url": _get_base_url_path("/edge_worker/static/main.umd.cjs"),
|
|
241
256
|
"destination": "nav",
|
|
242
|
-
"url_route": "
|
|
243
|
-
"category": "admin",
|
|
244
|
-
"icon": "/edge_worker/res/cloud-computer.svg",
|
|
245
|
-
"icon_dark_mode": "/edge_worker/res/cloud-computer-dark.svg",
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "Edge Worker Jobs",
|
|
249
|
-
"bundle_url": "/edge_worker/static/main.umd.cjs",
|
|
250
|
-
"url_route": "edge_jobs",
|
|
257
|
+
"url_route": "edge_executor",
|
|
251
258
|
"category": "admin",
|
|
252
|
-
"icon": "/edge_worker/res/cloud-computer.svg",
|
|
253
|
-
"icon_dark_mode": "/edge_worker/res/cloud-computer-dark.svg",
|
|
259
|
+
"icon": _get_base_url_path("/edge_worker/res/cloud-computer.svg"),
|
|
260
|
+
"icon_dark_mode": _get_base_url_path("/edge_worker/res/cloud-computer-dark.svg"),
|
|
254
261
|
},
|
|
255
262
|
]
|
|
256
263
|
external_views = [
|
|
257
264
|
{
|
|
258
265
|
"name": "Edge Worker API docs",
|
|
259
|
-
"href": "/edge_worker/docs",
|
|
266
|
+
"href": _get_base_url_path("/edge_worker/docs"),
|
|
260
267
|
"destination": "nav",
|
|
261
268
|
"category": "docs",
|
|
262
|
-
"icon": "/edge_worker/res/cloud-computer.svg",
|
|
263
|
-
"icon_dark_mode": "/edge_worker/res/cloud-computer-dark.svg",
|
|
269
|
+
"icon": _get_base_url_path("/edge_worker/res/cloud-computer.svg"),
|
|
270
|
+
"icon_dark_mode": _get_base_url_path("/edge_worker/res/cloud-computer-dark.svg"),
|
|
264
271
|
"url_route": "edge_worker_api_docs",
|
|
265
272
|
}
|
|
266
273
|
]
|
|
@@ -271,7 +278,7 @@ class EdgeExecutorPlugin(AirflowPlugin):
|
|
|
271
278
|
appbuilder_menu_items = [
|
|
272
279
|
{
|
|
273
280
|
"name": "Edge Worker API docs",
|
|
274
|
-
"href": "/edge_worker/v1/ui",
|
|
281
|
+
"href": _get_base_url_path("/edge_worker/v1/ui"),
|
|
275
282
|
"category": "Docs",
|
|
276
283
|
}
|
|
277
284
|
]
|