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


##########
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:
   Done, I hope the explanation is clear?



##########
airflow/models/baseoperator.py:
##########
@@ -1456,12 +1456,14 @@ def xcom_push(
         context["ti"].xcom_push(key=key, value=value, 
execution_date=execution_date)
 
     @staticmethod
+    @provide_session
     def xcom_pull(
         context: Any,
         task_ids: str | list[str] | None = None,
         dag_id: str | None = None,
         key: str = XCOM_RETURN_KEY,
         include_prior_dates: bool | None = None,
+        session: Session = NEW_SESSION,

Review Comment:
   Done



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