This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new dcd651c32ab Fix executor validation error referencing non-existent 
[core] executors (#71336)
dcd651c32ab is described below

commit dcd651c32abe8281d3bb1e3b7583f4c125733365
Author: Roshan Prabu <[email protected]>
AuthorDate: Mon Aug 10 21:57:04 2026 +0530

    Fix executor validation error referencing non-existent [core] executors 
(#71336)
    
    `_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 3bf82804bff..76de19240fa 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 0ea0a29fc14..285a00bc25c 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 @@ class TestValidateExecutorFields:
                     "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 @@ class TestValidateExecutorFields:
                 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 @@ class TestValidateExecutorFields:
                     "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."
         ),
     ):

Reply via email to