mirror of
https://github.com/apache/superset.git
synced 2026-07-08 15:55:33 +00:00
Addresses review feedback on the Databricks OAuth2 flow:
- `oauth2_exception` was set to `OAuth2RedirectError` (Superset's own redirect
signal, also the base default), so `needs_oauth2()` never matched a real
Databricks token failure and the dance never auto-started. The driver has no
dedicated auth exception, so detect auth failures from the error message
instead (mirrors `GSheetsEngineSpec.needs_oauth2`).
- The per-cloud endpoint templates pointed Azure at Entra ID directly
(`login.microsoftonline.com`) and required `account_id`/`tenant_id`
substitution. Databricks fronts the U2M flow on every workspace at
`https://<host>/oidc/v1/{authorize,token}` across AWS/Azure/GCP, so the
authorization endpoint now derives from the workspace host with no account
identifier. The token endpoint still requires explicit config (no DB context
at exchange time); the error and docs now point at the workspace-host URL.
Shared OAuth logic is consolidated onto `DatabricksDynamicBaseEngineSpec`,
removing the duplicated overrides in both engine specs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>