Skip to content

Commit 2717d46

Browse files
Bump github.com/databricks/databricks-sdk-go from 0.40.1 to 0.41.0 (#3604)
* --- updated-dependencies: - dependency-name: github.com/databricks/databricks-sdk-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hector Castejon Diaz <[email protected]>
1 parent a8fbf28 commit 2717d46

14 files changed

+37
-44
lines changed

catalog/resource_lakehouse_monitor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const lakehouseMonitorDefaultProvisionTimeout = 15 * time.Minute
1616

1717
func WaitForMonitor(w *databricks.WorkspaceClient, ctx context.Context, monitorName string) error {
1818
return retry.RetryContext(ctx, lakehouseMonitorDefaultProvisionTimeout, func() *retry.RetryError {
19-
endpoint, err := w.LakehouseMonitors.GetByTableName(ctx, monitorName)
19+
endpoint, err := w.QualityMonitors.GetByTableName(ctx, monitorName)
2020
if err != nil {
2121
return retry.NonRetryableError(err)
2222
}
@@ -68,7 +68,7 @@ func ResourceLakehouseMonitor() common.Resource {
6868
common.DataToStructPointer(d, monitorSchema, &create)
6969
create.TableName = d.Get("table_name").(string)
7070

71-
endpoint, err := w.LakehouseMonitors.Create(ctx, create)
71+
endpoint, err := w.QualityMonitors.Create(ctx, create)
7272
if err != nil {
7373
return err
7474
}
@@ -84,7 +84,7 @@ func ResourceLakehouseMonitor() common.Resource {
8484
if err != nil {
8585
return err
8686
}
87-
endpoint, err := w.LakehouseMonitors.GetByTableName(ctx, d.Id())
87+
endpoint, err := w.QualityMonitors.GetByTableName(ctx, d.Id())
8888
if err != nil {
8989
return err
9090

@@ -99,7 +99,7 @@ func ResourceLakehouseMonitor() common.Resource {
9999
var update catalog.UpdateMonitor
100100
common.DataToStructPointer(d, monitorSchema, &update)
101101
update.TableName = d.Get("table_name").(string)
102-
_, err = w.LakehouseMonitors.Update(ctx, update)
102+
_, err = w.QualityMonitors.Update(ctx, update)
103103
if err != nil {
104104
return err
105105
}
@@ -110,7 +110,7 @@ func ResourceLakehouseMonitor() common.Resource {
110110
if err != nil {
111111
return err
112112
}
113-
return w.LakehouseMonitors.DeleteByTableName(ctx, d.Id())
113+
return w.QualityMonitors.DeleteByTableName(ctx, d.Id())
114114
},
115115
Schema: monitorSchema,
116116
Timeouts: &schema.ResourceTimeout{

catalog/resource_lakehouse_monitor_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestLakehouseMonitorCornerCases(t *testing.T) {
1616
func TestLakehouseMonitorCreateTimeseries(t *testing.T) {
1717
qa.ResourceFixture{
1818
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
19-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
19+
e := w.GetMockQualityMonitorsAPI().EXPECT()
2020
e.Create(mock.Anything, catalog.CreateMonitor{
2121
TableName: "test_table",
2222
OutputSchemaName: "output.schema",
@@ -57,7 +57,7 @@ func TestLakehouseMonitorCreateTimeseries(t *testing.T) {
5757
func TestLakehouseMonitorCreateInference(t *testing.T) {
5858
qa.ResourceFixture{
5959
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
60-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
60+
e := w.GetMockQualityMonitorsAPI().EXPECT()
6161
e.Create(mock.Anything, catalog.CreateMonitor{
6262
TableName: "test_table",
6363
OutputSchemaName: "output.schema",
@@ -109,7 +109,7 @@ func TestLakehouseMonitorCreateInference(t *testing.T) {
109109
func TestLakehouseMonitorCreateSnapshot(t *testing.T) {
110110
qa.ResourceFixture{
111111
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
112-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
112+
e := w.GetMockQualityMonitorsAPI().EXPECT()
113113
e.Create(mock.Anything, catalog.CreateMonitor{
114114
TableName: "test_table",
115115
OutputSchemaName: "output.schema",
@@ -143,7 +143,7 @@ func TestLakehouseMonitorCreateSnapshot(t *testing.T) {
143143
func TestLakehouseMonitorGet(t *testing.T) {
144144
qa.ResourceFixture{
145145
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
146-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
146+
e := w.GetMockQualityMonitorsAPI().EXPECT()
147147
e.GetByTableName(mock.Anything, "test_table").Return(&catalog.MonitorInfo{
148148
TableName: "test_table",
149149
Status: catalog.MonitorInfoStatusMonitorStatusActive,
@@ -166,7 +166,7 @@ func TestLakehouseMonitorGet(t *testing.T) {
166166
func TestLakehouseMonitorUpdate(t *testing.T) {
167167
qa.ResourceFixture{
168168
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
169-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
169+
e := w.GetMockQualityMonitorsAPI().EXPECT()
170170
e.Update(mock.Anything, catalog.UpdateMonitor{
171171
TableName: "test_table",
172172
OutputSchemaName: "output.schema",
@@ -228,7 +228,7 @@ func TestLakehouseMonitorUpdate(t *testing.T) {
228228
func TestLakehouseMonitorDelete(t *testing.T) {
229229
qa.ResourceFixture{
230230
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
231-
e := w.GetMockLakehouseMonitorsAPI().EXPECT()
231+
e := w.GetMockQualityMonitorsAPI().EXPECT()
232232
e.DeleteByTableName(mock.Anything, "test_table").Return(nil)
233233
},
234234
Resource: ResourceLakehouseMonitor(),

catalog/resource_system_schema.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func ResourceSystemSchema() common.Resource {
4343
//enable new schema
4444
err = w.SystemSchemas.Enable(ctx, catalog.EnableRequest{
4545
MetastoreId: metastoreSummary.MetastoreId,
46-
SchemaName: catalog.EnableSchemaName(new),
46+
SchemaName: new,
4747
})
4848
//ignore "schema <schema-name> already exists" error
4949
if err != nil && !strings.Contains(err.Error(), "already exists") {
@@ -53,7 +53,7 @@ func ResourceSystemSchema() common.Resource {
5353
if old != "" {
5454
err = w.SystemSchemas.Disable(ctx, catalog.DisableRequest{
5555
MetastoreId: metastoreSummary.MetastoreId,
56-
SchemaName: catalog.DisableSchemaName(old),
56+
SchemaName: old,
5757
})
5858
if err != nil {
5959
return err
@@ -106,7 +106,7 @@ func ResourceSystemSchema() common.Resource {
106106
}
107107
return w.SystemSchemas.Disable(ctx, catalog.DisableRequest{
108108
MetastoreId: metastoreSummary.MetastoreId,
109-
SchemaName: catalog.DisableSchemaName(schemaName),
109+
SchemaName: schemaName,
110110
})
111111
},
112112
}

clusters/resource_cluster.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ func (ClusterSpec) CustomizeSchemaResourceSpecific(s *common.CustomizableSchema)
248248
}
249249

250250
func (ClusterSpec) CustomizeSchema(s *common.CustomizableSchema) *common.CustomizableSchema {
251-
s.SchemaPath("cluster_source").SetReadOnly()
252251
s.SchemaPath("enable_elastic_disk").SetComputed()
253252
s.SchemaPath("enable_local_disk_encryption").SetComputed()
254253
s.SchemaPath("node_type_id").SetComputed().SetConflictsWith([]string{"driver_instance_pool_id", "instance_pool_id"})

exporter/exporter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ var emptyStorageCrdentials = qa.HTTPFixture{
293293

294294
var emptyConnections = qa.HTTPFixture{
295295
Method: "GET",
296-
Resource: "/api/2.1/unity-catalog/connections",
296+
Resource: "/api/2.1/unity-catalog/connections?",
297297
Response: catalog.ListConnectionsResponse{},
298298
}
299299

exporter/importables.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2714,7 +2714,7 @@ var resourcesMap map[string]importable = map[string]importable{
27142714
return connectionType + "_" + connectionName
27152715
},
27162716
List: func(ic *importContext) error {
2717-
connections, err := ic.workspaceClient.Connections.ListAll(ic.Context)
2717+
connections, err := ic.workspaceClient.Connections.ListAll(ic.Context, catalog.ListConnectionsRequest{})
27182718
if err != nil {
27192719
return err
27202720
}

exporter/importables_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@ func TestConnections(t *testing.T) {
18431843
{
18441844
ReuseRequest: true,
18451845
Method: "GET",
1846-
Resource: "/api/2.1/unity-catalog/connections",
1846+
Resource: "/api/2.1/unity-catalog/connections?",
18471847
Response: catalog.ListConnectionsResponse{
18481848
Connections: []catalog.ConnectionInfo{
18491849
{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/databricks/terraform-provider-databricks
33
go 1.21
44

55
require (
6-
github.com/databricks/databricks-sdk-go v0.40.1
6+
github.com/databricks/databricks-sdk-go v0.41.0
77
github.com/golang-jwt/jwt/v4 v4.5.0
88
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
99
github.com/hashicorp/hcl v1.0.0

go.sum

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBS
2424
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
2525
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
2626
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
27-
github.com/databricks/databricks-sdk-go v0.40.0 h1:H9KAyRbM5lwnY8t9nY/xAYHVTBsLqFuIRwVaRGqYJe0=
28-
github.com/databricks/databricks-sdk-go v0.40.0/go.mod h1:Yjy1gREDLK65g4axpVbVNKYAHYE2Sqzj0AB9QWHCBVM=
29-
github.com/databricks/databricks-sdk-go v0.40.1 h1:rE5yP9gIW2oap+6CnumixnZSDIsXwVojAuDBuKUl5GU=
30-
github.com/databricks/databricks-sdk-go v0.40.1/go.mod h1:rLIhh7DvifVLmf2QxMr/vMRGqdrTZazn8VYo4LilfCo=
27+
github.com/databricks/databricks-sdk-go v0.41.0 h1:OyhYY+Q6+gqkWeXmpGEiacoU2RStTeWPF0x4vmqbQdc=
28+
github.com/databricks/databricks-sdk-go v0.41.0/go.mod h1:rLIhh7DvifVLmf2QxMr/vMRGqdrTZazn8VYo4LilfCo=
3129
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3230
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3331
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -223,8 +221,6 @@ go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw
223221
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
224222
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
225223
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
226-
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
227-
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
228224
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
229225
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
230226
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -245,8 +241,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
245241
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
246242
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
247243
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
248-
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
249-
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
250244
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
251245
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
252246
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -273,14 +267,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
273267
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
274268
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
275269
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
276-
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
277-
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
278270
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
279271
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
280272
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
281273
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
282-
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
283-
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
274+
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
275+
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
284276
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
285277
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
286278
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

jobs/resource_job.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ func (JobSettingsResource) CustomizeSchema(s *common.CustomizableSchema) *common
589589
s.SchemaPath("task", "for_each_task", "task", "run_if").SetSuppressDiffWithDefault(jobs.RunIfAllSuccess)
590590

591591
s.SchemaPath("task", "for_each_task", "task", "new_cluster", "cluster_id").Schema.Computed = false
592-
s.SchemaPath("task", "for_each_task", "task", "new_cluster").RemoveField("cluster_source")
593592

594593
// ======= To keep consistency with the manually maintained schema, should be reverted once full migration is done. ======
595594
s.SchemaPath("task", "task_key").SetOptional()

0 commit comments

Comments
 (0)