This is an automated email from the ASF dual-hosted git repository.
onikolas 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 0abcb372915 Insert a team_name similar to team conf for 2.X compat
(#61923)
0abcb372915 is described below
commit 0abcb372915cfcc432d6a0ec721816937c710656
Author: Niko Oliveira <[email protected]>
AuthorDate: Sun Feb 15 09:37:05 2026 -0800
Insert a team_name similar to team conf for 2.X compat (#61923)
A None team name is added if we are running against an older Airflow
version. Also don't use a team conf at all if the version isn't at least
3.2 (this is when airflow supports even a minimal version of multi-team)
---
.../celery/src/airflow/providers/celery/executors/celery_executor.py | 4 ++++
.../src/airflow/providers/celery/executors/celery_executor_utils.py | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git
a/providers/celery/src/airflow/providers/celery/executors/celery_executor.py
b/providers/celery/src/airflow/providers/celery/executors/celery_executor.py
index 8a0d93ef9c1..abb3b860059 100644
--- a/providers/celery/src/airflow/providers/celery/executors/celery_executor.py
+++ b/providers/celery/src/airflow/providers/celery/executors/celery_executor.py
@@ -114,6 +114,10 @@ class CeleryExecutor(BaseExecutor):
from airflow.configuration import conf as global_conf
self.conf = global_conf
+ # Also set team_name to None if it doesn't exist, since the Celery app
creation expects it to be
+ # there (even if it's None)
+ if not hasattr(self, "team_name"):
+ self.team_name = None
# Create Celery app, it will be team specific if the configuration has
been set for that.
from airflow.providers.celery.executors.celery_executor_utils import
create_celery_app
diff --git
a/providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py
b/providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py
index 14c2c2abb39..b09737701f3 100644
---
a/providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py
+++
b/providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py
@@ -42,7 +42,7 @@ from sqlalchemy import select
from airflow.configuration import AirflowConfigParser, conf
from airflow.executors.base_executor import BaseExecutor
-from airflow.providers.celery.version_compat import AIRFLOW_V_3_0_PLUS
+from airflow.providers.celery.version_compat import AIRFLOW_V_3_0_PLUS,
AIRFLOW_V_3_2_PLUS
from airflow.providers.common.compat.sdk import AirflowException,
AirflowTaskTimeout, Stats, timeout
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.net import get_hostname
@@ -319,7 +319,7 @@ def send_task_to_executor(
if TYPE_CHECKING:
_conf: ExecutorConf | AirflowConfigParser
# Check if Airflow version is greater than or equal to 3.2 to import
ExecutorConf
- if AIRFLOW_V_3_0_PLUS:
+ if AIRFLOW_V_3_2_PLUS:
from airflow.executors.base_executor import ExecutorConf
_conf = ExecutorConf(team_name)