Fix GetWorkspaceClient for unified account hosts#1517
Merged
hectorcast-db merged 2 commits intomainfrom Mar 5, 2026
Merged
Conversation
Previously, GetWorkspaceClient always constructed the workspace host using DeploymentURL(ws.DeploymentName), which appends the environment's DNS zone. This breaks for unified/SPOG hosts that don't follow the standard DNS zone pattern — the account and workspace share the same host. Now, workspaceHost() checks whether the account host matches the environment's DNS zone. If it does, the workspace URL is constructed normally from the deployment name. Otherwise (or if the DNS zone is empty), the account host is reused as the workspace host. Also propagates AccountID and Experimental_IsUnifiedHost to the workspace config when operating in unified host mode. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: Hector Castejon Diaz <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: Hector Castejon Diaz <[email protected]>
|
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
Mar 5, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 5, 2026
<!-- This template provides a recommended structure for PR descriptions. Adapt it freely — the goal is clarity, not rigid compliance. The three-section format (Summary / Why / What Changed) helps reviewers understand the change quickly and makes the PR easier to revisit later. --> ## Summary Adding an entry in NEXT_CHANGELOG.md for recent merged changes: * Fix `GetWorkspaceClient` for unified account hosts ([#1517](#1517)). * Add test for `GetWorkspaceClient` with SPOG host ([#1518](#1518)). <!-- One or two sentences describing what this PR changes and what it enables. Focus on the effect, not the implementation details. Example: Extracts the credentials chain iteration logic into a reusable `NewCredentialsChain` constructor so that internal tools can compose their own authentication chains from individual credential strategies. --> ## Why Tagging workflow doesn't trigger a release if NEXT_CHANGELOG.md is empty <!-- Explain the problem that motivated this change. A reviewer who reads only this section should understand why the PR exists and what problem it solves. - Start with the status quo: how things work today and what limitation exists. - Explain who is affected and what they cannot do (or must work around). - If alternatives were considered and rejected, briefly mention why. - End with how this PR addresses the gap. The "why" is the most important part of a PR description — it usually cannot be inferred from the code itself. --> ## What changed ### Interface changes <!-- New or modified public API surface: types, functions, configuration options. Use backticks for code references. Write "None." if there are no changes. Example: - **`NewCredentialsChain(...CredentialsStrategy) CredentialsStrategy`** — Takes an ordered list of credential strategies and returns a strategy that tries them in sequence. --> ### Behavioral changes <!-- User-visible behavior changes: different defaults, changed error messages, new side effects, performance characteristics. Write "None." if this is a pure refactor — this explicitly reassures reviewers. --> ### Internal changes <!-- Refactoring, file moves, implementation details, test infrastructure. Things that don't affect the public API or user-visible behavior. --> ## How is this tested? <!-- Describe any tests you have done, especially tests that are not part of the unit tests (e.g. local tests, integration tests, manual verification). ALWAYS ANSWER THIS QUESTION: answer with "N/A" if tests are not applicable to your PR (e.g. if the PR only modifies comments). Do not be afraid of answering "Not tested" if the PR has not been tested. Being clear about what has been done and not done provides important context to the reviewers. --> N/A
This was referenced Mar 10, 2026
github-merge-queue bot
pushed a commit
to databricks/cli
that referenced
this pull request
Mar 10, 2026
## Changes - Bump `github.com/databricks/databricks-sdk-go` from v0.117.0 to v0.119.0 - Update OpenAPI SHA - Regenerate CLI code via `make generate` <details><summary>SDK v0.117 -> v0.119.0 changelog</summary> <p> ## Release v0.119.0 (2026-03-09) ### API Changes * Add [dataclassification](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataclassification) and [knowledgeassistants](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/knowledgeassistants) packages. * Add [w.DataClassification](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataclassification#DataClassificationAPI) workspace-level service. * Add [w.KnowledgeAssistants](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/knowledgeassistants#KnowledgeAssistantsAPI) workspace-level service. * Add `GenieCreateEvalRun`, `GenieGetEvalResultDetails`, `GenieGetEvalRun`, `GenieListEvalResults` and `GenieListEvalRuns` methods for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service. * Add `TelemetryExportDestinations` field for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App). ## Release v0.118.0 (2026-03-05) ### Internal Changes * Fix `GetWorkspaceClient` for unified account hosts ([#1517](databricks/databricks-sdk-go#1517)). * Add test for `GetWorkspaceClient` with SPOG host ([#1518](databricks/databricks-sdk-go#1518)). </p> </details> ## Tests - [x] `make lintfull` - [x] go test ./internal/build ./bundle/internal/schema ./bundle/direct/dresources ./bundle/config/resources - [x] `make checks`
rauchy
pushed a commit
to databricks/cli
that referenced
this pull request
Mar 17, 2026
## Changes - Bump `github.com/databricks/databricks-sdk-go` from v0.117.0 to v0.119.0 - Update OpenAPI SHA - Regenerate CLI code via `make generate` <details><summary>SDK v0.117 -> v0.119.0 changelog</summary> <p> ## Release v0.119.0 (2026-03-09) ### API Changes * Add [dataclassification](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataclassification) and [knowledgeassistants](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/knowledgeassistants) packages. * Add [w.DataClassification](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataclassification#DataClassificationAPI) workspace-level service. * Add [w.KnowledgeAssistants](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/knowledgeassistants#KnowledgeAssistantsAPI) workspace-level service. * Add `GenieCreateEvalRun`, `GenieGetEvalResultDetails`, `GenieGetEvalRun`, `GenieListEvalResults` and `GenieListEvalRuns` methods for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service. * Add `TelemetryExportDestinations` field for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App). ## Release v0.118.0 (2026-03-05) ### Internal Changes * Fix `GetWorkspaceClient` for unified account hosts ([#1517](databricks/databricks-sdk-go#1517)). * Add test for `GetWorkspaceClient` with SPOG host ([#1518](databricks/databricks-sdk-go#1518)). </p> </details> ## Tests - [x] `make lintfull` - [x] go test ./internal/build ./bundle/internal/schema ./bundle/direct/dresources ./bundle/config/resources - [x] `make checks`
1 task
github-merge-queue bot
pushed a commit
to databricks/databricks-sdk-java
that referenced
this pull request
Mar 19, 2026
## 🥞 Stacked PR - [#710 Add cloud field to HostMetadata](#710) [[Files](https://github.com/databricks/databricks-sdk-java/pull/710/files)] - [**#711 Fix GetWorkspaceClient for unified account hosts**](#711) [[Files](https://github.com/databricks/databricks-sdk-java/pull/711/files)] - [#712 Add test for GetWorkspaceClient with SPOG host](#712) [[Files](https://github.com/databricks/databricks-sdk-java/pull/712/files)] - [#713 Call resolveHostMetadata on Config init](#713) [[Files](https://github.com/databricks/databricks-sdk-java/pull/713/files)] - [#714 Resolve TokenAudience from host metadata for account hosts](#714) [[Files](https://github.com/databricks/databricks-sdk-java/pull/714/files)] - [#718 Make GCP SA token refresh non-blocking](#718) [[Files](https://github.com/databricks/databricks-sdk-java/pull/718/files)] - [#719 Add integration test for host metadata resolution](#719) [[Files](https://github.com/databricks/databricks-sdk-java/pull/719/files)] - [#720 Remove unified flag usage, rely on host metadata](#720) [[Files](https://github.com/databricks/databricks-sdk-java/pull/720/files)] --------- ## Summary Port of Go SDK [#1517](databricks/databricks-sdk-go#1517). Fixes `getWorkspaceClient()` for unified account hosts that don't follow the standard environment DNS zone pattern (e.g. SPOG/unified hosts). Previously, the workspace host was always constructed via `getDeploymentUrl(ws.getDeploymentName())`, which blindly appends the environment's DNS zone. For unified hosts where the account and workspace share the same host, this produces an incorrect URL. **Changes:** - `AccountClient.getWorkspaceClient()`: clones config instead of mutating `this.config` for unified hosts **Note:** `AccountClient.java` is a generated file. The template needs to be updated. `NO_CHANGELOG=true` ## Test plan - [x] `AccountClientTest`: existing tests pass
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.
Changes
Fixes
GetWorkspaceClientfor unified account hosts that don't follow the standard environment DNS zone pattern (e.g. SPOG/unified hosts).Previously, the workspace host was always constructed via
DeploymentURL(ws.DeploymentName), which blindly appends the environment's DNS zone. For unified hosts where the account and workspace share the same host, this produces an incorrect URL.The new
workspaceHost()helper checks whether the account host matches the environment's DNS zone:ws.DeploymentNameas beforeAlso propagates
AccountIDandExperimental_IsUnifiedHostto the derived workspace config when in unified host mode.Tests
Added unit tests in
account_functions_test.gocovering:NO_CHANGELOG=true