Skip to content

Commit 0ce66a6

Browse files
authored
Bump the Databricks Go SDK to v0.66.0 (#4682)
## Changes Bump the Go SDK to v0.66.0. This has a number of breaking changes in the SDK due to internal refactors of the API specifications maintained by various API teams, so I've made sure those are accounted for in this PR. ## Tests Existing tests should pass.
1 parent c6f6f77 commit 0ce66a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+18495
-776
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
05692f4dcf168be190bb7bcda725ee8b368b7ae3
1+
ce962ccd0a078a5a9d89494fe38d237ce377d5f3

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ internal/providers/pluginfw/context/context.go linguist-generated=true
1818
internal/providers/pluginfw/converters/go_to_tf.go linguist-generated=true
1919
internal/providers/pluginfw/converters/names.go linguist-generated=true
2020
internal/providers/pluginfw/converters/tf_to_go.go linguist-generated=true
21+
internal/providers/pluginfw/products/alert_v2/data_alert_v2.go linguist-generated=true
22+
internal/providers/pluginfw/products/alert_v2/data_alerts_v2.go linguist-generated=true
23+
internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go linguist-generated=true
2124
internal/providers/pluginfw/products/budget_policy/data_budget_policies.go linguist-generated=true
2225
internal/providers/pluginfw/products/budget_policy/data_budget_policy.go linguist-generated=true
2326
internal/providers/pluginfw/products/budget_policy/resource_budget_policy.go linguist-generated=true

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### New Features and Improvements
66

7+
* Bump the Go SDK to v0.66.0 ([#4682](https://github.com/databricks/terraform-provider-databricks/pull/4682)).
8+
79
### Bug Fixes
810

911
* Fix automatic cluster creation for `databricks_sql_permissions` ([#4141](https://github.com/databricks/terraform-provider-databricks/pull/4141))

catalog/resource_online_table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func ResourceOnlineTable() common.Resource {
5454
}
5555
var table catalog.OnlineTable
5656
common.DataToStructPointer(d, s, &table)
57-
res, err := w.OnlineTables.Create(ctx, catalog.CreateOnlineTableRequest{Table: &table})
57+
res, err := w.OnlineTables.Create(ctx, catalog.CreateOnlineTableRequest{Table: table})
5858
if err != nil {
5959
return err
6060
}

catalog/resource_online_table_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func TestOnlineTableCreate(t *testing.T) {
6969
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
7070
e := w.GetMockOnlineTablesAPI().EXPECT()
7171
e.Create(mock.Anything, catalog.CreateOnlineTableRequest{
72-
Table: &catalog.OnlineTable{
72+
Table: catalog.OnlineTable{
7373
Name: "main.default.online_table",
7474
Spec: &catalog.OnlineTableSpec{
7575
RunTriggered: &catalog.OnlineTableSpecTriggeredSchedulingPolicy{},
@@ -93,7 +93,7 @@ func TestOnlineTableCreate_ErrorImmediately(t *testing.T) {
9393
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
9494
e := w.GetMockOnlineTablesAPI().EXPECT()
9595
e.Create(mock.Anything, catalog.CreateOnlineTableRequest{
96-
Table: &catalog.OnlineTable{
96+
Table: catalog.OnlineTable{
9797
Name: "main.default.online_table",
9898
Spec: &catalog.OnlineTableSpec{
9999
RunTriggered: &catalog.OnlineTableSpecTriggeredSchedulingPolicy{},
@@ -130,7 +130,7 @@ func TestOnlineTableCreate_ErrorInWait(t *testing.T) {
130130
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
131131
e := w.GetMockOnlineTablesAPI().EXPECT()
132132
e.Create(mock.Anything, catalog.CreateOnlineTableRequest{
133-
Table: &catalog.OnlineTable{
133+
Table: catalog.OnlineTable{
134134
Name: "main.default.online_table",
135135
Spec: &catalog.OnlineTableSpec{
136136
RunTriggered: &catalog.OnlineTableSpecTriggeredSchedulingPolicy{},

dashboards/dashboard_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func TestAccDashboardWithRemoteChange(t *testing.T) {
317317
require.NoError(t, err)
318318
_, err = w.Lakeview.Update(context.Background(), dashboards.UpdateDashboardRequest{
319319
DashboardId: dashboard_id,
320-
Dashboard: &dashboards.Dashboard{
320+
Dashboard: dashboards.Dashboard{
321321
DashboardId: dashboard_id,
322322
DisplayName: display_name,
323323
Etag: etag,
@@ -424,7 +424,7 @@ func TestAccDashboardTestAll(t *testing.T) {
424424
require.NoError(t, err)
425425
_, err = w.Lakeview.Update(context.Background(), dashboards.UpdateDashboardRequest{
426426
DashboardId: dashboard_id,
427-
Dashboard: &dashboards.Dashboard{
427+
Dashboard: dashboards.Dashboard{
428428
DashboardId: dashboard_id,
429429
DisplayName: display_name,
430430
Etag: etag,

dashboards/resource_dashboard.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ func ResourceDashboard() common.Resource {
7878
}
7979
d.Set("md5", md5Hash)
8080
dashboard.SerializedDashboard = content
81-
createdDashboard, err := w.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{Dashboard: &dashboard})
81+
createdDashboard, err := w.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{Dashboard: dashboard})
8282
if err != nil && isParentDoesntExistError(err) {
8383
log.Printf("[DEBUG] Parent folder '%s' doesn't exist, creating...", dashboard.ParentPath)
8484
err = w.Workspace.MkdirsByPath(ctx, dashboard.ParentPath)
8585
if err != nil {
8686
return err
8787
}
88-
createdDashboard, err = w.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{Dashboard: &dashboard})
88+
createdDashboard, err = w.Lakeview.Create(ctx, dashboards.CreateDashboardRequest{Dashboard: dashboard})
8989
}
9090
if err != nil {
9191
return err
@@ -153,7 +153,7 @@ func ResourceDashboard() common.Resource {
153153
dashboard.SerializedDashboard = content
154154
updatedDashboard, err := w.Lakeview.Update(ctx, dashboards.UpdateDashboardRequest{
155155
DashboardId: dashboard.DashboardId,
156-
Dashboard: &dashboard,
156+
Dashboard: dashboard,
157157
})
158158
if err != nil {
159159
return err

dashboards/resource_dashboard_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestDashboardCreate(t *testing.T) {
1818
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
1919
e := w.GetMockLakeviewAPI().EXPECT()
2020
e.Create(mock.Anything, dashboards.CreateDashboardRequest{
21-
Dashboard: &dashboards.Dashboard{
21+
Dashboard: dashboards.Dashboard{
2222
DisplayName: "Dashboard name",
2323
WarehouseId: "abc",
2424
ParentPath: "/path",
@@ -71,7 +71,7 @@ func TestDashboardCreate_NoParent(t *testing.T) {
7171
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
7272
lv := w.GetMockLakeviewAPI().EXPECT()
7373
lv.Create(mock.Anything, dashboards.CreateDashboardRequest{
74-
Dashboard: &dashboards.Dashboard{
74+
Dashboard: dashboards.Dashboard{
7575
DisplayName: "Dashboard name",
7676
WarehouseId: "abc",
7777
ParentPath: "/path",
@@ -80,7 +80,7 @@ func TestDashboardCreate_NoParent(t *testing.T) {
8080
}).Return(nil, fmt.Errorf("Path (/path) doesn't exist.")).Once()
8181
w.GetMockWorkspaceAPI().EXPECT().MkdirsByPath(mock.Anything, "/path").Return(nil)
8282
lv.Create(mock.Anything, dashboards.CreateDashboardRequest{
83-
Dashboard: &dashboards.Dashboard{
83+
Dashboard: dashboards.Dashboard{
8484
DisplayName: "Dashboard name",
8585
WarehouseId: "abc",
8686
ParentPath: "/path",
@@ -180,7 +180,7 @@ func TestDashboardUpdate(t *testing.T) {
180180
e := w.GetMockLakeviewAPI().EXPECT()
181181
e.Update(mock.Anything, dashboards.UpdateDashboardRequest{
182182
DashboardId: "xyz",
183-
Dashboard: &dashboards.Dashboard{
183+
Dashboard: dashboards.Dashboard{
184184
DashboardId: "xyz",
185185
DisplayName: "Dashboard name",
186186
WarehouseId: "abc",

exporter/importables.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,7 @@ var resourcesMap map[string]importable = map[string]importable{
25012501
ic.Emit(&resource{
25022502
Resource: "databricks_mws_ncc_private_endpoint_rule",
25032503
ID: nc.NetworkConnectivityConfigId + "/" + rule.RuleId,
2504-
Name: nc.Name + "_" + resourceId + "_" + rule.GroupId.String(),
2504+
Name: nc.Name + "_" + resourceId + "_" + rule.GroupId,
25052505
})
25062506
}
25072507
}

go.mod

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/databricks/terraform-provider-databricks
33
go 1.24.0
44

55
require (
6-
github.com/databricks/databricks-sdk-go v0.63.0
6+
github.com/databricks/databricks-sdk-go v0.66.0
77
github.com/golang-jwt/jwt/v4 v4.5.2
88
github.com/hashicorp/go-cty v1.5.0
99
github.com/hashicorp/hcl v1.0.0
@@ -18,13 +18,13 @@ require (
1818
github.com/hashicorp/terraform-plugin-testing v1.12.0
1919
github.com/stretchr/testify v1.10.0
2020
github.com/zclconf/go-cty v1.16.2
21-
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
21+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
2222
)
2323

2424
require (
25-
cloud.google.com/go/auth v0.4.2 // indirect
26-
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
27-
cloud.google.com/go/compute/metadata v0.5.2 // indirect
25+
cloud.google.com/go/auth v0.16.1 // indirect
26+
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
27+
cloud.google.com/go/compute/metadata v0.6.0 // indirect
2828
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
2929
github.com/ProtonMail/go-crypto v1.1.3 // indirect
3030
github.com/agext/levenshtein v1.2.3 // indirect
@@ -38,14 +38,15 @@ require (
3838
github.com/fsnotify/fsnotify v1.8.0 // indirect
3939
github.com/go-logr/logr v1.4.2 // indirect
4040
github.com/go-logr/stdr v1.2.2 // indirect
41-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
41+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
4242
github.com/golang/protobuf v1.5.4 // indirect
4343
github.com/google/go-cmp v0.7.0 // indirect
4444
github.com/google/go-querystring v1.1.0 // indirect
45-
github.com/google/s2a-go v0.1.7 // indirect
45+
github.com/google/s2a-go v0.1.9 // indirect
4646
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
4747
github.com/google/uuid v1.6.0 // indirect
48-
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
48+
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
49+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
4950
github.com/hashicorp/errwrap v1.1.0 // indirect
5051
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
5152
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -75,27 +76,27 @@ require (
7576
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
7677
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
7778
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
78-
go.opencensus.io v0.24.0 // indirect
79-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
80-
go.opentelemetry.io/otel v1.31.0 // indirect
81-
go.opentelemetry.io/otel/metric v1.31.0 // indirect
82-
go.opentelemetry.io/otel/trace v1.31.0 // indirect
83-
golang.org/x/crypto v0.36.0 // indirect
79+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
80+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
81+
go.opentelemetry.io/otel v1.35.0 // indirect
82+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
83+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
84+
golang.org/x/crypto v0.37.0 // indirect
8485
golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
8586
golang.org/x/mod v0.24.0 // indirect
86-
golang.org/x/net v0.38.0 // indirect
87-
golang.org/x/oauth2 v0.23.0 // indirect
88-
golang.org/x/sync v0.12.0 // indirect
89-
golang.org/x/sys v0.31.0 // indirect
90-
golang.org/x/term v0.30.0 // indirect
91-
golang.org/x/text v0.23.0 // indirect
92-
golang.org/x/time v0.5.0 // indirect
93-
golang.org/x/tools v0.31.0 // indirect
94-
google.golang.org/api v0.182.0 // indirect
87+
golang.org/x/net v0.39.0 // indirect
88+
golang.org/x/oauth2 v0.29.0 // indirect
89+
golang.org/x/sync v0.13.0 // indirect
90+
golang.org/x/sys v0.32.0 // indirect
91+
golang.org/x/term v0.31.0 // indirect
92+
golang.org/x/text v0.24.0 // indirect
93+
golang.org/x/time v0.11.0 // indirect
94+
golang.org/x/tools v0.32.0 // indirect
95+
google.golang.org/api v0.231.0 // indirect
9596
google.golang.org/appengine v1.6.8 // indirect
96-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
97-
google.golang.org/grpc v1.69.4 // indirect
98-
google.golang.org/protobuf v1.36.3 // indirect
97+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 // indirect
98+
google.golang.org/grpc v1.72.0 // indirect
99+
google.golang.org/protobuf v1.36.6 // indirect
99100
gopkg.in/ini.v1 v1.67.0 // indirect
100101
gopkg.in/yaml.v3 v3.0.1 // indirect
101102
gotest.tools/gotestsum v1.12.1 // indirect

0 commit comments

Comments
 (0)