aminghadersohi opened a new pull request, #43265:
URL: https://github.com/apache/superset/pull/43265

   ## Why
   
   Third-party SQLAlchemy dialect entry points are discovered during database 
engine-spec enumeration. An entry point can load successfully while returning 
an object that does not satisfy the dialect contract, such as an object without 
`.name`. That exception currently escapes the plugin boundary and can break 
application bootstrap for every user rather than disabling only the malformed 
connector.
   
   ## What
   
   Validate and normalize the loaded dialect's `name` and `driver` inside the 
existing third-party entry-point exception boundary. Malformed plugins are 
logged and skipped. A regression test models an entry point that loads an 
object without `.name`.
   
   ## Blast radius
   
   Only database connector discovery is affected. Valid SQLAlchemy dialects 
follow the same path as before; malformed optional plugins now degrade in 
isolation.
   
   ## How to test
   
   * Added `test_malformed_dialect_entry_point_does_not_break_bootstrap`.
   * `PRE_COMMIT_HOME=/tmp/pre-commit-superset uvx pre-commit run --files 
superset/db_engine_specs/__init__.py 
tests/unit_tests/db_engine_specs/test_init.py` passed all applicable hooks.
   * Direct pytest execution was blocked by the current repository dependency 
conflict between the SQLAlchemy 2 project constraint and the Databricks extra's 
SQLAlchemy `<2` constraint.
   
   ## Risk & rollback
   
   Low risk: the change broadens the existing plugin isolation boundary and 
changes the failed-plugin log from debug to warning. Revert this commit to 
restore the previous behavior.
   
   ## Review guidance
   
   Please review the exception boundary in 
`superset/db_engine_specs/__init__.py` first, then the malformed-contract 
regression fixture.
   


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

Reply via email to