ferruzzi commented on code in PR #62645:
URL: https://github.com/apache/airflow/pull/62645#discussion_r3067093254
##########
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:
If we merge this over the weekend, I can have that fix in a new PR ready to
review on Monday. I did it this way for a reason, but I can't remember what
that reason was. I propose just making the helper accept an optional
`conf_source` which defaults to the global `conf`, then localexecutor can just
pass in the `team_conf`
--
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]