amoghrajesh commented on code in PR #43934:
URL: https://github.com/apache/airflow/pull/43934#discussion_r1842536822


##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -303,3 +307,45 @@ def delete_dag(
             status.HTTP_409_CONFLICT, f"Task instances of dag with id: 
'{dag_id}' are still running"
         )
     return Response(status_code=status.HTTP_204_NO_CONTENT)
+
+
+@dags_router.get(
+    "/{dag_id}/assets/queuedEvent",
+    responses=create_openapi_http_exception_doc(
+        [

Review Comment:
   @pierrejeambrun I do not think we will be able to do that in fastAPI like we 
did in connexion becuase I still have to maintain the interface and not change 
the endpoint to `/public/assets/multi_consumer_dag/assets/queuedEvent`. When i 
try to register the endpoint to the dags_router from assets.py, I get a 
circular import:
   
   ```
   test setup failed
   ../../../conftest.py:27: in test_client
       return TestClient(create_app())
   ../../../../../airflow/api_fastapi/app.py:58: in create_app
       init_views(app)
   ../../../../../airflow/api_fastapi/core_api/app.py:49: in init_views
       from airflow.api_fastapi.core_api.routes.public import public_router
   ../../../../../airflow/api_fastapi/core_api/routes/public/__init__.py:24: in 
<module>
       from airflow.api_fastapi.core_api.routes.public.assets import 
assets_router
   ../../../../../airflow/api_fastapi/core_api/routes/public/assets.py:48: in 
<module>
       from airflow.api_fastapi.core_api.routes.public import dags_router
   E   ImportError: cannot import name 'dags_router' from partially initialized 
module 'airflow.api_fastapi.core_api.routes.public' (most likely due to a 
circular import) 
(/Users/amoghdesai/Documents/OSS/airflow/airflow/api_fastapi/core_api/routes/public/__init__.py)
   
   ```



-- 
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]

Reply via email to