From 0e46a6fdc048cc0b4623a05defba662dc1d3f595 Mon Sep 17 00:00:00 2001 From: roshanprabu Date: Sun, 9 Aug 2026 01:44:45 +0530 Subject: [PATCH] Fix executor validation error referencing non-existent [core] executors _validate_executor_fields raised UnknownExecutorException telling users to check their "[core] executors configuration" when a task's executor isn't available. That config key doesn't exist -- Airflow has a single [core] executor key (conf.get_mandatory_value("core", "executor")), which accepts a comma-separated list to configure multiple executors. The plural "executors" only ever appears in this error text, sending users looking for a setting that isn't there. Fixes both branches of the message (with and without a team name). --- airflow-core/src/airflow/dag_processing/dagbag.py | 4 ++-- airflow-core/tests/unit/dag_processing/test_dagbag.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/airflow-core/src/airflow/dag_processing/dagbag.py b/airflow-core/src/airflow/dag_processing/dagbag.py index 3bf82804bffe1..76de19240fad5 100644 --- a/airflow-core/src/airflow/dag_processing/dagbag.py +++ b/airflow-core/src/airflow/dag_processing/dagbag.py @@ -151,12 +151,12 @@ def _validate_executor_fields(dag: DAG, bundle_name: str | None = None) -> None: f"Task '{task.task_id}' specifies executor '{task.executor}', which is not available " f"for team '{dag_team_name}' (the team associated with DAG '{dag.dag_id}') or as a global executor. " f"Make sure '{task.executor}' is configured for team '{dag_team_name}' or globally in your " - "[core] executors configuration, or update the task's executor to use one of the " + "[core] executor configuration, or update the task's executor to use one of the " f"configured executors for team '{dag_team_name}' or available global executors." ) raise UnknownExecutorException( f"Task '{task.task_id}' specifies executor '{task.executor}', which is not available. " - "Make sure it is listed in your [core] executors configuration, or update the task's " + "Make sure it is listed in your [core] executor configuration, or update the task's " "executor to use one of the configured executors." ) diff --git a/airflow-core/tests/unit/dag_processing/test_dagbag.py b/airflow-core/tests/unit/dag_processing/test_dagbag.py index 0ea0a29fc145b..285a00bc25cb9 100644 --- a/airflow-core/tests/unit/dag_processing/test_dagbag.py +++ b/airflow-core/tests/unit/dag_processing/test_dagbag.py @@ -185,7 +185,7 @@ def test_executor_validation_failure_with_team(self, mock_lookup, mock_manager_c "Task 'task1' specifies executor 'invalid.executor', which is not available " "for team 'test_team' (the team associated with DAG 'test-dag') or as a global executor. " "Make sure 'invalid.executor' is configured for team 'test_team' or globally in your " - "[core] executors configuration, or update the task's executor to use one of the " + "[core] executor configuration, or update the task's executor to use one of the " "configured executors for team 'test_team' or available global executors." ), ): @@ -204,7 +204,7 @@ def test_executor_validation_failure_no_team(self, mock_lookup): UnknownExecutorException, match=re.escape( "Task 'task1' specifies executor 'invalid.executor', which is not available. " - "Make sure it is listed in your [core] executors configuration, or update the task's " + "Make sure it is listed in your [core] executor configuration, or update the task's " "executor to use one of the configured executors." ), ): @@ -258,7 +258,7 @@ def test_global_executor_fallback_failure(self, mock_lookup, mock_manager_class) "Task 'task1' specifies executor 'unknown.executor', which is not available " "for team 'test_team' (the team associated with DAG 'test-dag') or as a global executor. " "Make sure 'unknown.executor' is configured for team 'test_team' or globally in your " - "[core] executors configuration, or update the task's executor to use one of the " + "[core] executor configuration, or update the task's executor to use one of the " "configured executors for team 'test_team' or available global executors." ), ): @@ -330,7 +330,7 @@ def test_validate_executor_field_executor_not_configured(): UnknownExecutorException, match=re.escape( "Task 't1' specifies executor 'test.custom.executor', which is not available. " - "Make sure it is listed in your [core] executors configuration, or update the task's " + "Make sure it is listed in your [core] executor configuration, or update the task's " "executor to use one of the configured executors." ), ):