ashb commented on a change in pull request #4864: [AIRFLOW-3832] Remove DagBag 
dependency from /rendered.
URL: https://github.com/apache/airflow/pull/4864#discussion_r263333840
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -486,16 +486,22 @@ def rendered(self):
         dag_id = request.args.get('dag_id')
         task_id = request.args.get('task_id')
         execution_date = request.args.get('execution_date')
+        root = request.args.get('root', '')
+
         dttm = pendulum.parse(execution_date)
         form = DateTimeForm(data={'execution_date': dttm})
-        root = request.args.get('root', '')
-        dag = dagbag.get_dag(dag_id)
+
+        dag_model = DagModel.get_dagmodel(dag_id)
+        dag = dag_model.get_dag()
 
 Review comment:
   The other PRs have a `flash()` if dag_model isn't found - should we have 
that here too?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to