kaxil commented on code in PR #62645:
URL: https://github.com/apache/airflow/pull/62645#discussion_r3066953729
##########
airflow-core/src/airflow/executors/local_executor.py:
##########
@@ -49,11 +46,23 @@
setproctitle = lambda title, logger: real_setproctitle(title)
if TYPE_CHECKING:
- from structlog.typing import FilteringBoundLogger as Logger
-
+ from airflow.executors.workloads import ExecutorWorkload
from airflow.executors.workloads.types import WorkloadResultType
+def _get_execution_api_server_url(team_conf) -> str:
+ """
+ Resolve the execution API server URL from team-specific configuration.
+
+ :param team_conf: Team-specific executor configuration (ExecutorConf or
AirflowConfigParser)
+ """
+ base_url = team_conf.get("api", "base_url", fallback="/")
+ if base_url.startswith("/"):
+ base_url = f"http://localhost:8080{base_url}"
+ default_execution_api_server = f"{base_url.rstrip('/')}/execution/"
+ return team_conf.get("core", "execution_api_server_url",
fallback=default_execution_api_server)
Review Comment:
We have duplicate resolution here and file above.. but this can be handled
in a sep PR
--
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]