dstandish commented on code in PR #25959:
URL: https://github.com/apache/airflow/pull/25959#discussion_r961842790


##########
airflow/models/dagrun.py:
##########
@@ -252,19 +252,22 @@ def refresh_from_db(self, session: Session = NEW_SESSION) 
-> None:
 
     @classmethod
     @provide_session
-    def active_runs_of_dags(cls, dag_ids=None, only_running=False, 
session=None) -> Dict[str, int]:
+    def active_runs_of_dags(
+        cls,
+        dag_ids: Optional[Iterable[str]] = None,
+        only_running: bool = False,
+        session: Session = NEW_SESSION,
+    ) -> Dict[str, int]:
         """Get the number of active dag runs for each dag."""
         query = session.query(cls.dag_id, func.count('*'))
         if dag_ids is not None:
-            # 'set' called to avoid duplicate dag_ids, but converted back to 
'list'
-            # because SQLAlchemy doesn't accept a set here.
-            query = query.filter(cls.dag_id.in_(list(set(dag_ids))))
+            query = query.filter(cls.dag_id.in_(dag_ids))

Review Comment:
   there are other places where this method is called, and they aren't all 
already set-like



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