stijndehaes commented on code in PR #31128:
URL: https://github.com/apache/airflow/pull/31128#discussion_r1188590290
##########
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:
I update the explanation a bit. As to why the session is not properly
closed, I actually do not know. Looking at the code again I can not figure out
a reason why it would not close. In the code itself of `_get_bound_query` in
the `LazyXComAccess` there is a try finally that closes the session.
--
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]