Send X-Databricks-Workspace-Id for workspace routing#216
Merged
Conversation
…clients Regenerated client output: workspace-scoped methods now set the X-Databricks-Workspace-Id header instead of X-Databricks-Org-Id. Mechanical rename across 74 generated client.ts files (774 occurrences); no logic change. Co-authored-by: Isaac Signed-off-by: Divyansh Vijayvergia <divyansh.vijayvergia@databricks.com>
Reflect the X-Databricks-Workspace-Id rename in hand-written code: - options: ClientOptions.workspaceId doc names the new header and notes the value may be a classic numeric workspace ID or another workspace identifier format the server understands. - core: Profile.workspaceId doc widened with the same note. - examples: profile-client comment and its test assertion updated. Co-authored-by: Isaac Signed-off-by: Divyansh Vijayvergia <divyansh.vijayvergia@databricks.com>
|
Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes. |
parthban-db
approved these changes
Jun 15, 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
On unified Databricks hosts that serve multiple workspaces, the SDK sends a routing header so the gateway can dispatch each workspace-scoped request to the correct workspace. This PR switches that header from
X-Databricks-Org-IdtoX-Databricks-Workspace-Id.Why
The Databricks platform is consolidating workspace addressing onto a single header,
X-Databricks-Workspace-Id, which accepts a broader range of workspace identifier formats (the server disambiguates). The previous header continues to be accepted by the platform, so older SDK versions keep working; new versions should send the new name. This brings the JS SDK in line with the same migration already shipped in the Go SDK (databricks/databricks-sdk-go#1688).What changed
Interface changes
None. The workspace ID still comes from the same configuration field —
workspaceIdonClientOptions, theworkspace_idprofile key, and theDATABRICKS_WORKSPACE_IDenvironment variable — unchanged in name and type (string).Behavioral changes
Workspace-scoped requests now carry
X-Databricks-Workspace-Id: <workspaceId>instead ofX-Databricks-Org-Id: <workspaceId>when a workspace ID is configured. Account-scoped requests are unaffected — they send no routing header. The configured value may now be either a classic numeric workspace ID or another workspace identifier format the server understands; the docs forClientOptions.workspaceIdand theworkspaceIdprofile field are widened to note this.Internal changes
The header literal is emitted by the SDK generator, so the bulk of this PR is regenerated client output: a mechanical rename across 74 generated
client.tsfiles (774 occurrences) with no logic change, isolated in the first commit. The second commit updates the hand-written docs, theprofile-clientexample, and its test.How is this tested?
npm run build,npm run format:check,npm run lint,npm run typecheck,npm test, andnpm run test:browserall pass. Theprofile-clientexample test asserts the outgoing request carriesX-Databricks-Workspace-Idset to the configured (non-numeric) workspace ID.This pull request and its description were written by Isaac.