rusackas commented on code in PR #41421:
URL: https://github.com/apache/superset/pull/41421#discussion_r3484710472
##########
superset/db_engine_specs/databricks.py:
##########
@@ -474,6 +579,74 @@ class
DatabricksNativeEngineSpec(DatabricksDynamicBaseEngineSpec):
supports_dynamic_catalog = True
supports_cross_catalog_queries = True
+ # OAuth 2.0 support
+ supports_oauth2 = True
+ oauth2_exception = OAuth2RedirectError
Review Comment:
Yeah, you're right, that was backwards. `OAuth2RedirectError` is what we
raise, not what the driver throws, so `needs_oauth2()` never fired and the
dance didn't auto-start. Fixed in `330e628d`: the databricks driver has no
typed auth exception like trino's `TrinoAuthError`, so I match the auth failure
from the error message instead, the way gsheets does. Worth sanity-checking the
exact signals against a live workspace. Good catch!
##########
superset/db_engine_specs/databricks.py:
##########
@@ -685,6 +858,74 @@ class
DatabricksPythonConnectorEngineSpec(DatabricksDynamicBaseEngineSpec):
supports_dynamic_schema = supports_catalog = supports_dynamic_catalog =
True
+ # OAuth 2.0 support
+ supports_oauth2 = True
+ oauth2_exception = OAuth2RedirectError
Review Comment:
Same root cause here. The duplicated OAuth block is gone now too, the flow
lives on the shared `DatabricksDynamicBaseEngineSpec` so both specs pick up the
message-based `needs_oauth2`. Folded into `330e628d`.
--
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]