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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
