Add X-Databricks-Org-Id header to SharesExtImpl.list() for SPOG#772
Merged
hectorcast-db merged 1 commit intomainfrom Apr 21, 2026
Merged
Add X-Databricks-Org-Id header to SharesExtImpl.list() for SPOG#772hectorcast-db merged 1 commit intomainfrom
hectorcast-db merged 1 commit intomainfrom
Conversation
Hand-written extension methods in the mixins bypass the generated
per-call header logic. On SPOG hosts, requests without
X-Databricks-Org-Id are rejected by the proxy with:
Error: Unable to load OAuth Config (400 UNKNOWN)
Generated service methods (e.g. WorkspaceImpl.export/importContent,
SharesImpl.* generated endpoints) already set this header when
cfg.workspaceId is populated. This change brings the hand-written
SharesExtImpl.list() in line.
Ports databricks/databricks-sdk-go#1635. The other two fixes from
databricks/databricks-sdk-py#1397 do not apply to Java:
- WorkspaceExt.upload/download: no hand-written Java equivalent; the
generated WorkspaceImpl.export()/importContent() already set the
header on every call.
- WorkspaceClient.get_workspace_id() short-circuit: Java WorkspaceClient
has no equivalent method.
Co-authored-by: Isaac
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
tanmay-db
approved these changes
Apr 21, 2026
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
Ports databricks/databricks-sdk-go#1635 and the applicable piece of databricks/databricks-sdk-py#1397 to the Java SDK.
SharesExtImpl.list()is a hand-written extension that callsapiClient.execute()directly and was missing theX-Databricks-Org-Idrequest header. On SPOG hosts this causes the call to fail with:Generated service methods already set this header when
cfg.workspaceIdis populated (see any*Impl.javaunderservice/, e.g.WorkspaceImpl.export()/importContent()orSharesImpl.create()). This change brings the hand-written extension in line.Scope vs. the Python PR
databricks-sdk-py#1397 contains three fixes; only one applies to Java:
SharesExt.list()missingX-Databricks-Org-IdWorkspaceExt.upload()/WorkspaceExt.download()missing headerWorkspaceExt; generatedWorkspaceImpl.export()/importContent()already include the headerWorkspaceClient.get_workspace_id()short-circuitWorkspaceClienthas nogetWorkspaceId()methodTest plan
mvn compilecleanNo dedicated unit test added, matching the Go PR (
#1635) and Python PR which applied the same pattern without one — there is no test infrastructure for asserting per-request headers on the hand-written extensions.This pull request was AI-assisted by Isaac.