You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/03 15:09:51 UTC

[GitHub] [airflow] vincbeck opened a new pull request, #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

vincbeck opened a new pull request, #28693:
URL: https://github.com/apache/airflow/pull/28693

   Closes #28614


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066629412


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   (We can do that in another PR though, this problem is common to most of the AIP-44 PRs.)
   
   Edit: Ah there’s already #28841



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
vincbeck commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066411274


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   I fixed the circular dependency by moving the `BaseSerialization` import. I think that should be enough?. I also updated the function `internal_api_call` to fix another issue. Feel free to take a look
   



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062143530


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   Import from `airflow.models.dag` instead, we try to localise imports for performance reasons.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066629079


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   I still don’t like both `airflow.models` and `airflow.api_internal` import each other, although _technically_ the imports are not circular. Wrap `METHODS_MAP` in a function with local imports should be better.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
Taragolis commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062842165


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   I assume this is Circular Import error, unfortunetly Python 3.7 do not show this kind of error well



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
Taragolis commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062852715


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   Seem like this not help, I've just tried both options and it failed with same error (and also how to reproduce locally)
   
   ```console
   
   ❯ breeze --python 3.9 --backend postgres shell --db-reset
   
   Creating docker-compose_airflow_run ... done
   
   Running Initialization. Your basic configuration is:
   
     * Airflow home: /root/airflow
     * Airflow sources: /opt/airflow
     * Airflow core SQL connection: 
   
   
   Using airflow version from current sources
   
   
   Checking backend and integrations.
   
   PostgreSQL: OK.  
   
   
   Resetting the DB
   
   DB: postgresql+psycopg2://postgres:***@postgres/airflow
   [2023-01-05T20:06:21.922+0000] {db.py:1608} INFO - Dropping tables that exist
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 33, in <module>
       sys.exit(load_entry_point('apache-airflow', 'console_scripts', 'airflow')())
     File "/opt/airflow/airflow/__main__.py", line 39, in main
       args.func(args)
     File "/opt/airflow/airflow/cli/cli_parser.py", line 52, in command
       return func(*args, **kwargs)
     File "/opt/airflow/airflow/cli/commands/db_command.py", line 46, in resetdb
       db.resetdb(skip_init=args.skip_init)
     File "/opt/airflow/airflow/utils/session.py", line 75, in wrapper
       return func(*args, session=session, **kwargs)
     File "/opt/airflow/airflow/utils/db.py", line 1610, in resetdb
       import_all_models()
     File "/opt/airflow/airflow/models/__init__.py", line 61, in import_all_models
       __getattr__(name)
     File "/opt/airflow/airflow/models/__init__.py", line 83, in __getattr__
       val = import_string(f"{path}.{name}")
     File "/opt/airflow/airflow/utils/module_loading.py", line 36, 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 "<frozen importlib._bootstrap>", line 1030, in _gcd_import
     File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
     File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
     File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
     File "<frozen importlib._bootstrap_external>", line 850, in exec_module
     File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
     File "/opt/airflow/airflow/models/dag.py", line 65, in <module>
       from airflow.api_internal.internal_api_call import internal_api_call
     File "/opt/airflow/airflow/api_internal/internal_api_call.py", line 29, in <module>
       from airflow.serialization.serialized_objects import BaseSerialization
     File "/opt/airflow/airflow/serialization/serialized_objects.py", line 42, in <module>
       from airflow.models.dag import DAG, create_timetable
   ImportError: cannot import name 'DAG' from partially initialized module 'airflow.models.dag' (most likely due to a circular import) (/opt/airflow/airflow/models/dag.py)
   
   Error: check_environment returned 1. Exiting.
   
   ERROR: 1
   Error 1 returned
   ```
   
   Unfortunetly local unit test can't handle circular import 😢 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1063074749


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   Thinking again, it makes me uncomfortable that a module in `api_internal` is imported by something in `models`, but `models` is then imported into another module in `api_internal`. I understand this technically does not cause an import cycle, but it seems like an easy one to get wrong eventually by somebody.
   
   Maybe it would be a good idea to put the imports here in a lazily-evaluated function? Or maybe we could build `METHODS_MAP` automatically when a function is decorated by `internal_api_call`?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] mhenc commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
mhenc commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066315168


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   `internal_api_call` decorator is client-side, while `METHODS_MAP` is at server-side.
   
   I agree that mixing the direction of imports may lead to the problems later.
   
   What about simply wrapping the building of `METHODS_MAP` into a additional method (with imports there).
   Like: https://github.com/apache/airflow/pull/28841



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
vincbeck commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066412297


##########
airflow/api_internal/internal_api_call.py:
##########
@@ -94,21 +93,20 @@ def make_jsonrpc_request(method_name: str, params_json: str) -> bytes:
         return response.content
 
     @wraps(func)
-    def wrapper(*args, **kwargs) -> RT | None:
+    def wrapper(*args, **kwargs) -> RT:
         use_internal_api = InternalApiConfig.get_use_internal_api()
         if not use_internal_api:
             return func(*args, **kwargs)
 
+        from airflow.serialization.serialized_objects import BaseSerialization  # avoid circular import
+
         bound = inspect.signature(func).bind(*args, **kwargs)
         arguments_dict = dict(bound.arguments)
         if "session" in arguments_dict:
             del arguments_dict["session"]
         args_json = json.dumps(BaseSerialization.serialize(arguments_dict))
-        method_name = f"{func.__module__}.{func.__name__}"
+        method_name = f"{func.__module__}.{func.__qualname__}"
         result = make_jsonrpc_request(method_name, args_json)
-        if result:

Review Comment:
   `result` is never `None` because if there is not output of the function we send an empty JSON. [See here](https://github.com/apache/airflow/blob/main/airflow/api_internal/endpoints/rpc_api_endpoint.py#L75)



##########
airflow/api_internal/internal_api_call.py:
##########
@@ -94,21 +93,20 @@ def make_jsonrpc_request(method_name: str, params_json: str) -> bytes:
         return response.content
 
     @wraps(func)
-    def wrapper(*args, **kwargs) -> RT | None:
+    def wrapper(*args, **kwargs) -> RT:
         use_internal_api = InternalApiConfig.get_use_internal_api()
         if not use_internal_api:
             return func(*args, **kwargs)
 
+        from airflow.serialization.serialized_objects import BaseSerialization  # avoid circular import
+
         bound = inspect.signature(func).bind(*args, **kwargs)
         arguments_dict = dict(bound.arguments)
         if "session" in arguments_dict:
             del arguments_dict["session"]
         args_json = json.dumps(BaseSerialization.serialize(arguments_dict))
-        method_name = f"{func.__module__}.{func.__name__}"
+        method_name = f"{func.__module__}.{func.__qualname__}"
         result = make_jsonrpc_request(method_name, args_json)
-        if result:

Review Comment:
   Having the type `RT | None` as return type was introducing some issues like [here](https://github.com/apache/airflow/blob/main/airflow/dag_processing/processor.py#L793). `paused_dag_ids` could be `None` and Python did not like it (rightfully so)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] mhenc commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
mhenc commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066315168


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   `internal_api_call` decorator is client-side, while `METHODS_MAP` is at server-side.
   
   I agree that mixing the direction of imports may lead to the problems later.
   
   What about simply wrapping the building of `METHODS_MAP` into a additional method (with imports there).
   Like: https://github.com/apache/airflow/pull/28841/files



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
vincbeck commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062802930


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   When I do this, I got this error though: `ImportError: cannot import name 'DAG' from 'airflow.models.dag'`. Tests are failing because of that



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28693:
URL: https://github.com/apache/airflow/pull/28693#issuecomment-1397793451

   > Is there any action item/comment here I should act on or we can forward with this PR?
   
   Rebasing/conflict resolving after we merged #28841 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1066629412


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models.dag import DagModel

Review Comment:
   (We can do that in another PR though, this problem is common to most of the AIP-44 PRs.)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
vincbeck commented on PR #28693:
URL: https://github.com/apache/airflow/pull/28693#issuecomment-1384256287

   Is there any action item/comment here I should act on or we can forward with this PR?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #28693:
URL: https://github.com/apache/airflow/pull/28693#issuecomment-1398800466

   Done


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk merged pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #28693:
URL: https://github.com/apache/airflow/pull/28693


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vincbeck commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
vincbeck commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062844404


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   Should I import it from `airflow.models` then?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on a diff in pull request #28693: AIP-44 Migrate DagModel.get_paused_dag_ids to Internal API

Posted by GitBox <gi...@apache.org>.
Taragolis commented on code in PR #28693:
URL: https://github.com/apache/airflow/pull/28693#discussion_r1062852715


##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -24,6 +24,7 @@
 
 from airflow.api_connexion.types import APIResponse
 from airflow.dag_processing.processor import DagFileProcessor
+from airflow.models import DagModel

Review Comment:
   Seem like this not help, I've just tried both options and it failed with same error (and also how to reproduce locally)
   
   ```console
   
   ❯ breeze --python 3.9 --backend postgres shell --db-reset
   
   Creating docker-compose_airflow_run ... done
   
   Running Initialization. Your basic configuration is:
   
     * Airflow home: /root/airflow
     * Airflow sources: /opt/airflow
     * Airflow core SQL connection: 
   
   
   Using airflow version from current sources
   
   
   Checking backend and integrations.
   
   PostgreSQL: OK.  
   
   
   Resetting the DB
   
   DB: postgresql+psycopg2://postgres:***@postgres/airflow
   [2023-01-05T20:06:21.922+0000] {db.py:1608} INFO - Dropping tables that exist
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 33, in <module>
       sys.exit(load_entry_point('apache-airflow', 'console_scripts', 'airflow')())
     File "/opt/airflow/airflow/__main__.py", line 39, in main
       args.func(args)
     File "/opt/airflow/airflow/cli/cli_parser.py", line 52, in command
       return func(*args, **kwargs)
     File "/opt/airflow/airflow/cli/commands/db_command.py", line 46, in resetdb
       db.resetdb(skip_init=args.skip_init)
     File "/opt/airflow/airflow/utils/session.py", line 75, in wrapper
       return func(*args, session=session, **kwargs)
     File "/opt/airflow/airflow/utils/db.py", line 1610, in resetdb
       import_all_models()
     File "/opt/airflow/airflow/models/__init__.py", line 61, in import_all_models
       __getattr__(name)
     File "/opt/airflow/airflow/models/__init__.py", line 83, in __getattr__
       val = import_string(f"{path}.{name}")
     File "/opt/airflow/airflow/utils/module_loading.py", line 36, 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 "<frozen importlib._bootstrap>", line 1030, in _gcd_import
     File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
     File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
     File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
     File "<frozen importlib._bootstrap_external>", line 850, in exec_module
     File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
     File "/opt/airflow/airflow/models/dag.py", line 65, in <module>
       from airflow.api_internal.internal_api_call import internal_api_call
     File "/opt/airflow/airflow/api_internal/internal_api_call.py", line 29, in <module>
       from airflow.serialization.serialized_objects import BaseSerialization
     File "/opt/airflow/airflow/serialization/serialized_objects.py", line 42, in <module>
       from airflow.models.dag import DAG, create_timetable
   ImportError: cannot import name 'DAG' from partially initialized module 'airflow.models.dag' (most likely due to a circular import) (/opt/airflow/airflow/models/dag.py)
   
   Error: check_environment returned 1. Exiting.
   
   ERROR: 1
   Error 1 returned
   ```
   
   Unfortunetly local unit test can't handle some of circular import 😢 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org