uranusjr commented on code in PR #31128:
URL: https://github.com/apache/airflow/pull/31128#discussion_r1188031677


##########
airflow/lineage/__init__.py:
##########
@@ -133,13 +134,16 @@ def wrapper(self, context, *args, **kwargs):
 
             # Remove auto and task_ids
             self.inlets = [i for i in self.inlets if not isinstance(i, str)]
-            _inlets = self.xcom_pull(context, task_ids=task_ids, 
dag_id=self.dag_id, key=PIPELINE_OUTLETS)
+            with create_session() as session:
+                _inlets = self.xcom_pull(
+                    context, task_ids=task_ids, dag_id=self.dag_id, 
key=PIPELINE_OUTLETS, session=session
+                )

Review Comment:
   Would be a good idea to add a comment explaining why this additional session 
creation is needed, and why it eliminates the issue (the dangling session in 
`LazyXComAccess`).



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