wolfier opened a new issue, #55810:
URL: https://github.com/apache/airflow/issues/55810
### Apache Airflow version
2.11.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
The scheduler is failing to start. The errors seem to be originating from
importing BaseOperator that is triggered by a custom plugin. This happens to
other plugins too.
```[2025-09-17T22:30:23.470+0000] {plugins_manager.py:267} ERROR - Failed to
import plugin openlineage
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/airflow/plugins_manager.py",
line 259, in load_entrypoint_plugins
plugin_class = entry_point.load()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 205,
in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 999, in exec_module
File "<frozen importlib._bootstrap>", line 488, in
_call_with_frames_removed
File
"/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/openlineage.py",
line 21, in <module>
from airflow.providers.openlineage.plugins.listener import
get_openlineage_listener
File
"/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/listener.py",
line 31, in <module>
from airflow.models import DagRun, TaskInstance
File "/usr/local/lib/python3.12/site-packages/airflow/models/__init__.py",
line 79, in __getattr__
val = import_string(f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/utils/module_loading.py", line
39, in import_string
module = import_module(module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/airflow/models/dagrun.py",
line 60, in <module>
from airflow.models.taskinstance import TaskInstance as TI
File
"/usr/local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line
106, in <module>
from airflow.sentry import Sentry
File "/usr/local/lib/python3.12/site-packages/airflow/sentry.py", line
196, in <module>
Sentry = ConfiguredSentry()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/airflow/sentry.py", line 88,
in __init__
executor_class, _ =
ExecutorLoader.import_default_executor_cls(validate=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/executors/executor_loader.py",
line 314, in import_default_executor_cls
executor, source = cls.import_executor_cls(executor_name,
validate=validate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/executors/executor_loader.py",
line 302, in import_executor_cls
return _import_and_validate(executor_name.module_path),
executor_name.connector_source
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/executors/executor_loader.py",
line 286, in _import_and_validate
executor = import_string(path)
^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/utils/module_loading.py", line
39, in import_string
module = import_module(module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/astronomer/kubernetes/executors/kubernetes_executor.py",
line 39, in <module>
from astronomer.kubernetes.pod_generator import PodGenerator
File
"/usr/local/lib/python3.12/site-packages/astronomer/kubernetes/pod_generator.py",
line 24, in <module>
from astronomer.kubernetes.version_compat import AIRFLOW_V_3_0_PLUS
File
"/usr/local/lib/python3.12/site-packages/astronomer/kubernetes/version_compat.py",
line 41, in <module>
from airflow.models import BaseOperator
File "/usr/local/lib/python3.12/site-packages/airflow/models/__init__.py",
line 79, in __getattr__
val = import_string(f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/utils/module_loading.py", line
39, in import_string
module = import_module(module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/airflow/models/baseoperator.py", line
83, in <module>
from airflow.models.mappedoperator import OperatorPartial,
validate_mapping_kwargs
File
"/usr/local/lib/python3.12/site-packages/airflow/models/mappedoperator.py",
line 54, in <module>
from airflow.triggers.base import StartTriggerArgs
File "/usr/local/lib/python3.12/site-packages/airflow/triggers/base.py",
line 27, in <module>
from airflow.models.taskinstance import SimpleTaskInstance
ImportError: cannot import name 'SimpleTaskInstance' from partially
initialized module 'airflow.models.taskinstance' (most likely due to a circular
import) (/usr/local/lib/python3.12/site-packages/airflow/models/taskinstance.py)
```
### What you think should happen instead?
The scheduler using Kubernetes Executor should start up without issue when
sentry is installed and enabled.
### How to reproduce
1. Start a deployment with Runtime 13.2.0 (Airflow 2.11.0)
2. Configure the custom XCom backend to
airflow.providers.common.io.xcom.backend.XComObjectStorageBackend.
Start the deployment.
FROM quay.io/astronomer/astro-runtime:13.2.0
ENV
AIRFLOW__CORE__XCOM_BACKEND=airflow.providers.common.io.xcom.backend.XComObjectStorageBackend
### Operating System
debian
### Versions of Apache Airflow Providers
_No response_
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]