kaxil commented on code in PR #73461:
URL: https://github.com/apache/airflow/pull/73461#discussion_r4619014604


##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -826,7 +826,7 @@ def latest_item_select_object(cls, dag_id):
                 .order_by(DagVersion.version_number.desc())
                 .limit(1)
             )
-            return select(cls).where(cls.id == latest_item_id)
+            return select(cls).where(cls.id == 
latest_item_id.scalar_subquery())

Review Comment:
   Could you also add `'error:implicitly coercing SELECT object to scalar 
subquery:sqlalchemy.exc.SAWarning:airflow'` to `filterwarnings` in 
`pyproject.toml`, next to the `Coercing Subquery object into a select() for use 
in IN()` line? That is how #38926 kept the IN() variant from coming back, and 
the MySQL backend tests already go through this branch via 
`SerializedDagModel.get`, so a regression would fail CI instead of quietly 
reappearing in logs.



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