-
Notifications
You must be signed in to change notification settings - Fork 48
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
CI: Fix circular import error for Airflow 2.2.5 #1396
Conversation
This should fix the following in CI: ``` File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/src/astro/custom_backend/astro_custom_backend.py", line 6, in <module> from astro.custom_backend.serializer import deserialize, serialize File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/src/astro/custom_backend/serializer.py", line 17, in <module> from astro.files import File File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/src/astro/files/__init__.py", line 6, in <module> from astro.files.operators.files import get_file_list_func # noqa: F401 # skipcq: PY-W2000 File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/src/astro/files/operators/files.py", line 5, in <module> from airflow.decorators.base import get_unique_task_id File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test-3-8-airflow-2-2-5/lib/python3.8/site-packages/airflow/decorators/__init__.py", line 20, in <module> from airflow.decorators.python import PythonDecoratorMixin, python_task # noqa File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test-3-8-airflow-2-2-5/lib/python3.8/site-packages/airflow/decorators/python.py", line 20, in <module> from airflow.decorators.base import DecoratedOperator, task_decorator_factory File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test-3-8-airflow-2-2-5/lib/python3.8/site-packages/airflow/decorators/base.py", line 26, in <module> from airflow.models import BaseOperator ImportError: cannot import name 'BaseOperator' from partially initialized module 'airflow.models' (most likely due to a circular import) ```
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.
With this it means we are exposing now get_file_list_func
as
from astro.files.operators.files import get_file_list_func
, instead of the previous
from astro.files import get_file_list_func
from
PR #1380 and that should not be an issue, right?
yup |
Codecov ReportBase: 93.95% // Head: 93.13% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1396 +/- ##
==========================================
- Coverage 93.95% 93.13% -0.82%
==========================================
Files 73 54 -19
Lines 3538 2854 -684
Branches 337 337
==========================================
- Hits 3324 2658 -666
+ Misses 148 130 -18
Partials 66 66 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This should fix the following in CI: