jscheffl commented on code in PR #56189:
URL: https://github.com/apache/airflow/pull/56189#discussion_r2404161642
##########
providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:
##########
@@ -227,6 +227,26 @@ def change_maintenance_comment(self, worker_name: str):
RUNNING_ON_APISERVER = "gunicorn" in sys.argv[0] and "airflow-webserver"
in sys.argv
+def _get_base_url_path(path: str) -> str:
+ """Construct URL path with webserver base_url prefix."""
+ base_url = conf.get("api", "base_url", fallback="/")
+ # Extract pathname from base_url (handles both full URLs and path-only)
+ if base_url.startswith(("http://", "https://")):
+ from urllib.parse import urlparse
+
+ base_path = urlparse(base_url).path
+ else:
+ base_path = base_url
+
+ # Normalize paths: remove trailing slash from base, ensure leading slash
on path
+ base_path = base_path.rstrip("/")
+ if not path.startswith("/"):
+ path = "/" + path
+
+ # Combine paths
Review Comment:
Okay, you are right. But I was mainly referring to the `path` as provided
via parameter which is consistent:
```suggestion
# Normalize paths: remove trailing slash from base, ensure leading slash
on path
base_path = base_path.rstrip("/")
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]