vincbeck commented on code in PR #60438:
URL: https://github.com/apache/airflow/pull/60438#discussion_r2686631830
##########
airflow-core/src/airflow/executors/executor_loader.py:
##########
@@ -249,6 +249,21 @@ def _get_team_executor_configs(cls, validate_teams: bool =
True) -> list[tuple[s
"'CeleryExecutor;team1=LocalExecutor' instead of
'team1=CeleryExecutor;team2=LocalExecutor')."
)
+ # Validate that global executors come before team executors
+ seen_team_executor = False
+ for team_name, _ in configs:
+ if team_name is not None:
+ seen_team_executor = True
+ elif seen_team_executor:
+ # Found a global executor after we've already seen a team
executor
+ raise AirflowConfigException(
Review Comment:
Why setting a boolean and then raising an exception if that flag is True
(but in a different loop iteration)? So if there is one executor configured and
this executor is team based, it will not raise an exception?
--
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]