Add SPOG support for ?o= routing in httpPath#1316
Open
msrathore-db wants to merge 2 commits intodatabricks:mainfrom
Open
Add SPOG support for ?o= routing in httpPath#1316msrathore-db wants to merge 2 commits intodatabricks:mainfrom
msrathore-db wants to merge 2 commits intodatabricks:mainfrom
Conversation
SPOG replaces workspace-specific hostnames with account-level vanity URLs. This requires workspace routing info (?o=<workspaceId> or x-databricks-org-id header) on all HTTP requests to the SPOG host. Fixes: 1. Property parser: use indexOf to split on first '=' only, so values containing '=' (like httpPath with ?o=) are preserved correctly (DatabricksConnectionContext.java) 2. Warehouse ID regex: (.+) -> ([^?&]+) to stop at query params (DatabricksJdbcConstants.java) 3. Auto-inject x-databricks-org-id header from ?o= in httpPath into custom headers map, propagating to Thrift, SEA, telemetry, and feature flags (DatabricksConnectionContext.java) 4. Propagate custom headers to telemetry and feature flag clients (TelemetryPushClient.java, DatabricksDriverFeatureFlagsContext.java) Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
DBFSVolumeClient uses the SDK's ApiClient directly for /api/2.0/fs/* endpoints. These requests need the x-databricks-org-id header for SPOG routing, same as telemetry and feature flags. Add connectionContext.getCustomHeaders() to all 5 HTTP request paths in DBFSVolumeClient (4 sync via apiClient, 1 async via requestBuilder). Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
ddcf35e to
df5451e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?o=value in httpPath (useindexOfto split on first=only)(.+)→([^?&]+))?o=<workspaceId>from httpPath and injectx-databricks-org-idheader on all HTTP requests (Thrift, SEA, telemetry, feature flags)Context
SPOG (Single Panel of Glass) replaces workspace-specific hostnames with account-level vanity URLs. Per the SPOG Peco Clients doc, the Thrift endpoint format changes to
{spogHost}/sql/1.0/warehouses/xxx?o=yyy. The driver needs to parse this?o=and route all HTTP requests with the workspace ID.Jira: XTA-15079
Test plan
?o=?o=?o=?o=NO_CHANGELOG=true
This pull request was AI-assisted by Isaac.