You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ashb (via GitHub)" <gi...@apache.org> on 2025/08/20 12:54:16 UTC

Re: [PR] 🚧 [AIP-94] Add support for read-only sql_alchemy sessions [airflow]

ashb commented on code in PR #54721:
URL: https://github.com/apache/airflow/pull/54721#discussion_r2288074053


##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -472,9 +472,9 @@ def latest_item_select_object(cls, dag_id):
         return select(cls).where(cls.dag_id == dag_id).order_by(cls.created_at.desc()).limit(1)
 
     @classmethod
-    @provide_session
+    @provide_readonly_session
     def get_latest_serialized_dags(
-        cls, *, dag_ids: list[str], session: Session = NEW_SESSION
+        cls, *, dag_ids: list[str], session: Session = NEW_READONLY_SESSION

Review Comment:
   Nit: I don't think we need `NEW_READONLY_SESSION` to be distinct from `NEW_SESSION` -- as the default doesn't actually do anything



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org