rusackas commented on PR #43110: URL: https://github.com/apache/superset/pull/43110#issuecomment-5298912822
Heya @aminghadersohi! Good catch on the crash, and the guard makes sense. One thing before I approve, though. `dialect.dbapi()` doesn't exist under SQLAlchemy 2.0 anymore (it's `import_dbapi()` now), so it throws `AttributeError` on any 2.0-native dialect and the broad `except` skips it. Our own `postgres.psycopg2` entry point from `setup.py` is one of those, so `postgresql` ends up with no detected driver and drops out of the available databases list entirely. I nearly missed it. I think we can drop the `dbapi()` call (the type/subclass/name guards already stop the crash), or use `import_dbapi()` with a fallback for older dialects. Either way, mind adding a case that asserts a valid dialect still comes through, so we'd catch a regression like this? Happy to lend a hand. -- 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]
