uranusjr commented on code in PR #34947: URL: https://github.com/apache/airflow/pull/34947#discussion_r1363481950
########## airflow/api_connexion/endpoints/dag_endpoint.py: ########## @@ -66,6 +66,11 @@ def get_dag_details(*, dag_id: str) -> APIResponse: dag: DAG = get_airflow_app().dag_bag.get_dag(dag_id) if not dag: raise NotFound("DAG not found", detail=f"The DAG with dag_id: {dag_id} was not found") + dag_model: DagModel = DagModel.get_dagmodel(dag_id=dag_id) + for key, value in dag_model.__dict__.items(): + if not key.startswith("_") and not hasattr(dag, key): + setattr(dag, key, value) Review Comment: Not sure if modifying the DAG object in-place is the right thing to do, I think the DAG bag reuses the objects in different calls. The opposite is likely better, fetching a DagModel object first and set attributes from a DAG. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org