-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AstroCustomXcomBackend circular import issue #1943
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When using AstroCustomXcomBackend and Python SDK 1.5, we were raising the exception: Traceback (most recent call last): File /usr/local/bin/airflow, line 5, in <module> from airflow.__main__ import main File /usr/local/lib/python3.9/site-packages/airflow/__init__.py, line 55, in <module> settings.initialize() File /usr/local/lib/python3.9/site-packages/airflow/settings.py, line 567, in initialize import_local_settings() File /usr/local/lib/python3.9/site-packages/airflow/settings.py, line 524, in import_local_settings import airflow_local_settings File /usr/local/airflow/airflow_local_settings.py, line 10, in <module> from airflow.models.baseoperator import BaseOperator File /usr/local/lib/python3.9/site-packages/airflow/models/baseoperator.py, line 75, in <module> from airflow.models.taskinstance import TaskInstance, clear_task_instances File /usr/local/lib/python3.9/site-packages/airflow/models/taskinstance.py, line 93, in <module> from airflow.models.xcom import XCOM_RETURN_KEY, LazyXComAccess, XCom File /usr/local/lib/python3.9/site-packages/airflow/models/xcom.py, line 835, in <module> XCom = resolve_xcom_backend() File /usr/local/lib/python3.9/site-packages/airflow/models/xcom.py, line 818, in resolve_xcom_backend clazz = conf.getimport(core, xcom_backend, fallback=fairflow.models.xcom.{BaseXCom.__name__}) File /usr/local/lib/python3.9/site-packages/airflow/configuration.py, line 809, in getimport return import_string(full_qualified_path) File /usr/local/lib/python3.9/site-packages/airflow/utils/module_loading.py, line 33, in import_string module = import_module(module_path) File /usr/local/lib/python3.9/importlib/__init__.py, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File /usr/local/lib/python3.9/site-packages/astro/custom_backend/astro_custom_backend.py, line 6, in <module> from astro.custom_backend.serializer import deserialize, serialize File /usr/local/lib/python3.9/site-packages/astro/custom_backend/serializer.py, line 12, in <module> if airflow.__version__ >= 2.3: AttributeError: partially initialized module 'airflow' has no attribute '__version__' (most likely due to a circular import) Relates to: apache/airflow#31379 Closes: #1939
utkarsharma2
approved these changes
May 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ashb
approved these changes
May 25, 2023
This was referenced May 25, 2023
Merged
Closed
Merged
tatiana
added a commit
that referenced
this pull request
May 25, 2023
tatiana
added a commit
that referenced
this pull request
May 25, 2023
Bug Fixes * Fix AstroCustomXcomBackend circular import issue. #1943
tatiana
added a commit
that referenced
this pull request
May 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using AstroCustomXcomBackend and Python SDK 1.5, we were raising the exception:
Relates to: apache/airflow#31379
Closes: #1939