Commit 4d195ac
authored
Remove unified flag usage, rely on host metadata (#720)
## 🥞 Stacked PR
Use this
[link](https://github.com/databricks/databricks-sdk-java/pull/720/files)
to review incremental changes.
-
[**hectorcast-db/stack/port-8-remove-unified-flag**](#720)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/720/files)]
---------
## Summary
Port of Go SDK
[#1547](databricks/databricks-sdk-go#1547).
Removes `HostType.UNIFIED` and all runtime checks of
`experimentalIsUnifiedHost`. Host type is now determined solely from URL
pattern (accounts.* = ACCOUNTS, else WORKSPACE). Host metadata
resolution (from earlier PRs in this stack) handles populating config
fields automatically.
**Key changes:**
- `getHostType()`: no longer returns `UNIFIED`; determined solely by URL
pattern
- `isAccountClient()`: no longer throws for unified hosts
- `getClientType()`: simplified, no `UNIFIED` case
- `fetchDefaultOidcEndpoints()`: removed unified OIDC branch, removed
`getUnifiedOidcEndpoints()`
- `DatabricksCliCredentialsProvider.buildHostArgs()`: removed
`--experimental-is-unified-host`, `--account-id`, `--workspace-id` flags
for unified case
- `AccountClient.getWorkspaceClient()`: uses DNS zone matching (like Go
SDK) to decide whether to reuse host or build deployment URL
- `HostType` enum: removed `UNIFIED` value
- `authenticate()`: removed `X-Databricks-Org-Id` header injection
(handled by generated `*Impl.java` files)
**Note:** `AccountClient.java` is a generated file. The template needs
to be updated.
`NO_CHANGELOG=true`
## Test plan
- [x] All 1086 tests pass
- [x] `UnifiedHostTest`, `DatabricksConfigTest`, `AccountClientTest`,
`DatabricksCliCredentialsProviderTest` updated1 parent f28430b commit 4d195ac
File tree
13 files changed
+152
-414
lines changed- databricks-sdk-java/src
- main/java/com/databricks/sdk
- core
- test/java/com/databricks/sdk
- core
- oauth
- integration
- service/gentesting/unittests
13 files changed
+152
-414
lines changedLines changed: 36 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 54 | + | |
66 | 55 | | |
67 | 56 | | |
68 | 57 | | |
| |||
Lines changed: 4 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 235 | + | |
| 236 | + | |
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
| |||
275 | 271 | | |
276 | 272 | | |
277 | 273 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | 274 | | |
284 | 275 | | |
285 | 276 | | |
| |||
746 | 737 | | |
747 | 738 | | |
748 | 739 | | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | 740 | | |
756 | 741 | | |
757 | 742 | | |
758 | 743 | | |
759 | 744 | | |
760 | 745 | | |
761 | | - | |
| 746 | + | |
762 | 747 | | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | 748 | | |
767 | 749 | | |
768 | 750 | | |
| |||
772 | 754 | | |
773 | 755 | | |
774 | 756 | | |
775 | | - | |
| 757 | + | |
776 | 758 | | |
777 | 759 | | |
778 | 760 | | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | 761 | | |
785 | 762 | | |
786 | 763 | | |
| |||
926 | 903 | | |
927 | 904 | | |
928 | 905 | | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | 906 | | |
939 | 907 | | |
940 | 908 | | |
941 | 909 | | |
942 | 910 | | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | 911 | | |
948 | 912 | | |
949 | 913 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
16 | 13 | | |
Lines changed: 3 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 56 | + | |
| 57 | + | |
74 | 58 | | |
75 | 59 | | |
76 | 60 | | |
| |||
79 | 63 | | |
80 | 64 | | |
81 | 65 | | |
82 | | - | |
83 | 66 | | |
84 | 67 | | |
85 | 68 | | |
| |||
Lines changed: 4 additions & 98 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 46 | + | |
141 | 47 | | |
142 | 48 | | |
0 commit comments