Skip to content

Commit 1a3f7ca

Browse files
committed
handle empty spaces
1 parent 52820af commit 1a3f7ca

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

airflow-core/src/airflow/executors/local_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _execute_work(log: logging.Logger, workload: workloads.ExecuteTask) -> None:
109109

110110
setproctitle(f"airflow worker -- LocalExecutor: {workload.ti.id}")
111111

112-
base_url = conf.get("api", "base_url", fallback="/") or "/"
112+
base_url = conf.get("api", "base_url", fallback="/").strip() or "/"
113113
# If it's a relative URL, use localhost:8080 as the default
114114
if base_url.startswith("/"):
115115
base_url = f"http://localhost:8080{base_url}"

providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def execute_workload(input: str) -> None:
161161

162162
log.info("[%s] Executing workload in Celery: %s", celery_task_id, workload)
163163

164-
base_url = conf.get("api", "base_url", fallback="/") or "/"
164+
base_url = conf.get("api", "base_url", fallback="/").strip() or "/"
165165
# If it's a relative URL, use localhost:8080 as the default
166166
if base_url.startswith("/"):
167167
base_url = f"http://localhost:8080{base_url}"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def execute_workload(workload: ExecuteTask) -> None:
5555

5656
log.info("Executing workload", workload=workload)
5757

58-
base_url = conf.get("api", "base_url", fallback="/") or "/"
58+
base_url = conf.get("api", "base_url", fallback="/").strip() or "/"
5959
# If it's a relative URL, use localhost:8080 as the default
6060
if base_url.startswith("/"):
6161
base_url = f"http://localhost:8080{base_url}"

0 commit comments

Comments
 (0)