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

   ### SUMMARY
   
   The database picker never offers the Apache Doris connection form; users 
have to type a SQLAlchemy URI.
   
   `/api/v1/database/available/` includes the `parameters` schema (which is 
what makes the modal render the form) only when the engine spec's 
`default_driver` is one of the drivers installed for its engine. 
`DorisEngineSpec.default_driver` was `"pydoris"`, but pydoris registers a 
`MySQLDialect_mysqldb` subclass (named `pydoris`) under the `doris` and 
`pydoris` entry points, so the only installed driver Superset detects is 
`mysqldb`:
   
   ```
   available_drivers: ['mysqldb'], default_driver: 'pydoris'  -> no 
"parameters", no form
   ```
   
   This sets `default_driver = "mysqldb"`. A URI built from the form would then 
be `pydoris+mysqldb://`, which is not a SQLAlchemy entry point either 
(`NoSuchModuleError`), so `build_sqlalchemy_uri` now emits the registered 
`doris://` scheme. (#44718 carries the same `build_sqlalchemy_uri` change for 
the old `pydoris+pydoris` default; whichever merges second can drop the 
duplicate.)
   
   ### TESTING INSTRUCTIONS
   
   `pytest tests/unit_tests/db_engine_specs/test_doris.py` — the three new 
cases fail on master and pass here.
   
   Live, against a local Apache Doris 4.1.3 all-in-one container with pydoris 
1.2.0 / mysqlclient: with this change `get_available_engine_specs()` reports 
`mysqldb` for Doris and `default_driver` matches it, so the form is offered; 
the URI built from the form parameters 
(`doris://root:@127.0.0.1:<port>/internal.information_schema`) loads the 
pydoris dialect and connects.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
   - [ ] 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]

Reply via email to