Commit 39df8cf
authored
Fix GetWorkspaceClient to clone config for unified hosts (#711)
## 🥞 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 pass1 parent c24277a commit 39df8cf
File tree
1 file changed
+4
-3
lines changed- databricks-sdk-java/src/main/java/com/databricks/sdk
1 file changed
+4
-3
lines changedLines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments