ephraimbuddy commented on code in PR #31486:
URL: https://github.com/apache/airflow/pull/31486#discussion_r1205846772
##########
airflow/utils/db.py:
##########
@@ -1004,15 +1010,17 @@ def reflect_tables(tables: list[Base | str] | None,
session):
"""
import sqlalchemy.schema
- metadata = sqlalchemy.schema.MetaData(session.bind)
+ bind = session.bind
+ metadata = sqlalchemy.schema.MetaData()
+ metadata.bind = bind
if tables is None:
- metadata.reflect(resolve_fks=False)
+ metadata.reflect(bind=bind, resolve_fks=False)
else:
for tbl in tables:
try:
table_name = tbl if isinstance(tbl, str) else tbl.__tablename__
- metadata.reflect(only=[table_name], extend_existing=True,
resolve_fks=False)
+ metadata.reflect(bind=bind, only=[table_name],
extend_existing=True, resolve_fks=False)
Review Comment:
Have removed it. I remember having some issues around the metadata but let's
see if the CI passes cause I can't reproduce locally
--
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]