wjddn279 commented on code in PR #65127:
URL: https://github.com/apache/airflow/pull/65127#discussion_r3073356131
##########
airflow-core/src/airflow/settings.py:
##########
@@ -434,6 +434,12 @@ def configure_orm(disable_connection_pool=False,
pool_class=None):
# Skip DB initialization in unit tests, if DB tests are skipped
Session = SkipDBTestsSession
engine = None
+
+ # Ensure all models are imported so SQLAlchemy can resolve
string-based relationships in tests.
+ from airflow.models import import_all_models
+
+ import_all_models()
Review Comment:
Sure, we could probably fix it by tweaking other things as well. But should
we really have to run and fix each case one by one? That approach risks
breaking DB tests along the way, and it could make maintaining compatibility
even harder.
--
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]