jh242 commented on code in PR #27805:
URL: https://github.com/apache/airflow/pull/27805#discussion_r1035331621


##########
airflow/www/views.py:
##########
@@ -1895,6 +1895,20 @@ def trigger(self, session=None):
             flash(f"Cannot create dagruns because the dag {dag_id} has import 
errors", "error")
             return redirect(origin)
 
+        recent_confs = (
+            session.query(DagRun.conf)
+            .filter(
+                DagRun.dag_id == dag_id,
+                DagRun.run_type == DagRunType.MANUAL,
+                DagRun.conf.isnot(None),
+            )
+            .order_by(DagRun.execution_date.desc())
+            .limit(5)
+            .all()

Review Comment:
   I'm a bit of an SQLalchemy noob--I thought that dropping in a .distinct 
after (or before) the .order_by clause would produce what we needed, but it 
doesn't seem to be working and I'm not sure why. Could I get a bit of guidance 
on this @bbovenzi ? Thanks in advance!



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