o-nikolas commented on code in PR #54486:
URL: https://github.com/apache/airflow/pull/54486#discussion_r2283185006
##########
airflow-core/src/airflow/executors/executor_loader.py:
##########
@@ -166,13 +161,26 @@ def _get_team_executor_configs(cls) -> list[tuple[str,
list[str]]]:
"""
from airflow.configuration import conf
- team_config = conf.get("core", "multi_team_config_files",
fallback=None)
- configs = []
- if team_config:
- cls.block_use_of_multi_team()
- for team in team_config.split(","):
- (_, team_id) = team.split(":")
- configs.append((team_id, conf.get_mandatory_list_value("core",
"executor", team_id=team_id)))
+ executor_config = conf.get_mandatory_value("core", "executor")
+ configs: list[tuple[str | None, list[str]]] = []
+ # The executor_config can look like a few things. One is just a single
executor name, such as
+ # "CeleryExecutor". Or a list of executors, such as
"CeleryExecutor,KubernetesExecutor,module.path.to.executor".
+ # In these cases these are all executors that are available to all
teams, with the first one being the
+ # default executor, as usual. The config can also look like a list of
executors, per team, with the team name
+ # prefixing each list of executors separated by a equal sign and then
each team list separated by a
+ # semi-colon.
+ #
"LocalExecutor;team1=CeleryExecutor;team2=KubernetesExecutor,module.path.to.executor".
+ if executor_config:
Review Comment:
Yupp, that's a fair nit. I'll actually also update it to raise and
exception, since returning empty list ultimately throws a more confusing
exception later, so an explicit one here is a better user experience.
--
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]