Skip to content

Commit 3df3f30

Browse files
committed
Fix execution API server URL handling for relative paths in KE
Follow-up of apache#49782 but for KubernetesExecutor.
1 parent 3953231 commit 3df3f30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

task-sdk/src/airflow/sdk/execution_time/execute_workload.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def execute_workload(workload: ExecuteTask) -> None:
5656
log.info("Executing workload", workload=workload)
5757

5858
base_url = conf.get("api", "base_url", fallback="/")
59+
# If it's a relative URL, use localhost:8080 as the default
60+
if base_url.startswith("/"):
61+
base_url = f"http://localhost:8080{base_url}"
5962
default_execution_api_server = f"{base_url.rstrip('/')}/execution/"
6063
server = conf.get("core", "execution_api_server_url", fallback=default_execution_api_server)
6164
log.info("Connecting to server:", server=server)

0 commit comments

Comments
 (0)