holmuk commented on code in PR #65127:
URL: https://github.com/apache/airflow/pull/65127#discussion_r3078763004


##########
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:
   Please check https://github.com/apache/airflow/pull/65206
   This PR doesn't introduce new ORM-related calls to `--skip-db-tests` mode, 
but rearrange the code a bit to allow serialization tests to run in this mode. 
I also checked that all unit-tests in airflow-core work with `--skip-db-tests`, 
the problem is only with serialization tests.



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