rusackas opened a new pull request, #42789: URL: https://github.com/apache/superset/pull/42789
### SUMMARY **Investigation only, do not merge.** Testing a theory for the flask-sqlalchemy 3.x break reverted in #42542. Root cause theory: Flask-AppBuilder's FSA-3.x compatibility shim (`flask_appbuilder/models/sqla/base.py`) doesn't wire `model_class=` through when it constructs `SQLA()`, unlike its FSA-2.x shim (`base_legacy.py`), which explicitly rebinds Superset's models onto FAB's own `declarative_base()` via `create_session()`/`get_bind()` overrides. Under FSA 3.x, Superset's models (all subclassing `flask_appbuilder.Model`) and `db.session`'s bind resolution end up looking at two disconnected declarative registries. This branch tests whether the fix is entirely Superset-side: passing `model_class=flask_appbuilder.models.sqla.Model` explicitly when constructing `db = get_sqla_class()()` in `superset/extensions/__init__.py`. Confirmed locally that this unifies `db.Model` with `flask_appbuilder.Model` (`db.Model is FABModel` is `True`). Local pytest against sqlite doesn't reproduce the original break either way (matches #42542's own finding that this only ever surfaced under real CI), so this PR exists purely to get a CI signal on `test-sqlite`/`test-mysql`. Full context: discussion #40273, step 6. ### TESTING INSTRUCTIONS N/A, investigation only. ### ADDITIONAL INFORMATION - [ ] Has associated issue - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
