Skip to content

Commit 31da6b5

Browse files
authored
Bump github.com/databricks/databricks-sdk-go from 0.22.0 to 0.23.0 (#2794)
* upgrade go sdk * fix test * fix * fix model serving test * suppress diff * add suppress diff * revert
1 parent 8a038ed commit 31da6b5

File tree

8 files changed

+84
-75
lines changed

8 files changed

+84
-75
lines changed

catalog/resource_metastore_data_access.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ func ResourceMetastoreDataAccess() *schema.Resource {
142142
return c.AccountOrWorkspaceRequest(func(acc *databricks.AccountClient) error {
143143
var storageCredential *catalog.AccountsStorageCredentialInfo
144144
storageCredential, err = acc.StorageCredentials.Get(ctx, catalog.GetAccountStorageCredentialRequest{
145-
MetastoreId: metastoreId,
146-
Name: dacName,
145+
MetastoreId: metastoreId,
146+
StorageCredentialName: dacName,
147147
})
148148
if err != nil {
149149
return err
@@ -179,9 +179,9 @@ func ResourceMetastoreDataAccess() *schema.Resource {
179179
}
180180
return c.AccountOrWorkspaceRequest(func(acc *databricks.AccountClient) error {
181181
return acc.StorageCredentials.Delete(ctx, catalog.DeleteAccountStorageCredentialRequest{
182-
MetastoreId: metastoreId,
183-
Name: dacName,
184-
Force: force,
182+
MetastoreId: metastoreId,
183+
StorageCredentialName: dacName,
184+
Force: force,
185185
})
186186
}, func(w *databricks.WorkspaceClient) error {
187187
return w.StorageCredentials.Delete(ctx, catalog.DeleteStorageCredentialRequest{

catalog/resource_metastore_data_access_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func TestCreateAccountDacWithAws(t *testing.T) {
209209
},
210210
{
211211
Method: "GET",
212-
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/?",
212+
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/bcd?",
213213
Response: catalog.StorageCredentialInfo{
214214
Name: "bcd",
215215
AwsIamRole: &catalog.AwsIamRole{
@@ -274,7 +274,7 @@ func TestCreateAccountDacWithAzMI(t *testing.T) {
274274
},
275275
{
276276
Method: "GET",
277-
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/?",
277+
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/bcd?",
278278
Response: catalog.StorageCredentialInfo{
279279
Name: "bcd",
280280
AzureManagedIdentity: &catalog.AzureManagedIdentity{
@@ -340,7 +340,7 @@ func TestCreateAccountDacWithDbGcpSA(t *testing.T) {
340340
},
341341
{
342342
Method: "GET",
343-
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/?",
343+
Resource: "/api/2.0/accounts/100/metastores/abc/storage-credentials/bcd?",
344344
Response: catalog.StorageCredentialInfo{
345345
Name: "bcd",
346346
DatabricksGcpServiceAccount: &catalog.DatabricksGcpServiceAccountResponse{

catalog/resource_storage_credential.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ func ResourceStorageCredential() *schema.Resource {
7070
return nil
7171
}
7272
_, err = acc.StorageCredentials.Update(ctx, catalog.AccountsUpdateStorageCredential{
73-
CredentialInfo: &update,
74-
MetastoreId: metastoreId,
75-
Name: storageCredential.CredentialInfo.Id,
73+
CredentialInfo: &update,
74+
MetastoreId: metastoreId,
75+
StorageCredentialName: storageCredential.CredentialInfo.Id,
7676
})
7777
if err != nil {
7878
return err
@@ -101,8 +101,8 @@ func ResourceStorageCredential() *schema.Resource {
101101

102102
return c.AccountOrWorkspaceRequest(func(acc *databricks.AccountClient) error {
103103
storageCredential, err := acc.StorageCredentials.Get(ctx, catalog.GetAccountStorageCredentialRequest{
104-
MetastoreId: d.Get("metastore_id").(string),
105-
Name: d.Id(),
104+
MetastoreId: d.Get("metastore_id").(string),
105+
StorageCredentialName: d.Id(),
106106
})
107107
if err != nil {
108108
return err
@@ -122,9 +122,9 @@ func ResourceStorageCredential() *schema.Resource {
122122

123123
return c.AccountOrWorkspaceRequest(func(acc *databricks.AccountClient) error {
124124
_, err := acc.StorageCredentials.Update(ctx, catalog.AccountsUpdateStorageCredential{
125-
CredentialInfo: &update,
126-
MetastoreId: d.Get("metastore_id").(string),
127-
Name: d.Id(),
125+
CredentialInfo: &update,
126+
MetastoreId: d.Get("metastore_id").(string),
127+
StorageCredentialName: d.Id(),
128128
})
129129
if err != nil {
130130
return err
@@ -142,9 +142,9 @@ func ResourceStorageCredential() *schema.Resource {
142142
force := d.Get("force_destroy").(bool)
143143
return c.AccountOrWorkspaceRequest(func(acc *databricks.AccountClient) error {
144144
return acc.StorageCredentials.Delete(ctx, catalog.DeleteAccountStorageCredentialRequest{
145-
Force: force,
146-
Name: d.Id(),
147-
MetastoreId: d.Get("metastore_id").(string),
145+
Force: force,
146+
StorageCredentialName: d.Id(),
147+
MetastoreId: d.Get("metastore_id").(string),
148148
})
149149
}, func(w *databricks.WorkspaceClient) error {
150150
return w.StorageCredentials.Delete(ctx, catalog.DeleteStorageCredentialRequest{

docs/resources/model_serving.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The following arguments are supported:
5858
* `model_version` - (Required) The version of the model in Databricks Model Registry to be served.
5959
* `workload_size` - (Required) The workload size of the served model. The workload size corresponds to a range of provisioned concurrency that the compute will autoscale between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency).
6060
* `scale_to_zero_enabled` - Whether the compute resources for the served model should scale down to zero. If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size will be 0. The default value is `true`.
61+
* `workload_type` - The workload type of the served model. The workload type selects which type of compute to use in the endpoint. For deep learning workloads, GPU acceleration is available by selecting workload types like `GPU_SMALL` and others. See documentation for all options. The default value is `CPU`.
6162
* `environment_vars` - (Optional) a map of environment variable name/values that will be used for serving this model. Environment variables may refer to Databricks secrets using the standard syntax: `{{secrets/secret_scope/secret_key}}`.
6263
* `instance_profile_arn` - (Optional) ARN of the instance profile that the served model will use to access AWS resources.
6364

@@ -96,7 +97,7 @@ timeouts {
9697
The model serving resource can be imported using the name of the endpoint.
9798

9899
```bash
99-
$ terraform import databricks_model_serving.this <model-serving-endpoint-name>
100+
terraform import databricks_model_serving.this <model-serving-endpoint-name>
100101
```
101102

102103
## Related Resources

exporter/exporter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,14 +1494,14 @@ func TestImportingIPAccessLists(t *testing.T) {
14941494
Method: "GET",
14951495
Resource: "/api/2.0/ip-access-lists/123?",
14961496
Response: settings.GetIpAccessListResponse{
1497-
IpAccessLists: []settings.IpAccessListInfo{resp},
1497+
IpAccessList: &resp,
14981498
},
14991499
},
15001500
{
15011501
Method: "GET",
15021502
Resource: "/api/2.0/ip-access-lists/124?",
15031503
Response: settings.GetIpAccessListResponse{
1504-
IpAccessLists: []settings.IpAccessListInfo{resp2},
1504+
IpAccessList: &resp2,
15051505
},
15061506
},
15071507
{

go.mod

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

55
require (
6-
github.com/databricks/databricks-sdk-go v0.22.0
6+
github.com/databricks/databricks-sdk-go v0.23.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
@@ -12,34 +12,34 @@ require (
1212
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0
1313
github.com/stretchr/testify v1.8.4
1414
github.com/zclconf/go-cty v1.14.1
15-
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
16-
golang.org/x/mod v0.12.0
15+
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
16+
golang.org/x/mod v0.13.0
1717
)
1818

1919
require (
2020
cloud.google.com/go/compute v1.23.0 // indirect
2121
cloud.google.com/go/compute/metadata v0.2.3 // indirect
22-
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
22+
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
2323
github.com/agext/levenshtein v1.2.3 // indirect
2424
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
2525
github.com/cloudflare/circl v1.3.3 // indirect
2626
github.com/davecgh/go-spew v1.1.1 // indirect
2727
github.com/fatih/color v1.15.0 // indirect
2828
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2929
github.com/golang/protobuf v1.5.3 // indirect
30-
github.com/google/go-cmp v0.5.9 // indirect
30+
github.com/google/go-cmp v0.6.0 // indirect
3131
github.com/google/go-querystring v1.1.0 // indirect
3232
github.com/google/s2a-go v0.1.7 // indirect
33-
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
33+
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
3434
github.com/hashicorp/errwrap v1.1.0 // indirect
3535
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
3636
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
3737
github.com/hashicorp/go-hclog v1.5.0 // indirect
3838
github.com/hashicorp/go-multierror v1.1.1 // indirect
39-
github.com/hashicorp/go-plugin v1.5.1 // indirect
39+
github.com/hashicorp/go-plugin v1.5.2 // indirect
4040
github.com/hashicorp/go-uuid v1.0.3 // indirect
4141
github.com/hashicorp/go-version v1.6.0 // indirect
42-
github.com/hashicorp/hc-install v0.6.0 // indirect
42+
github.com/hashicorp/hc-install v0.6.1 // indirect
4343
github.com/hashicorp/logutils v1.0.0 // indirect
4444
github.com/hashicorp/terraform-exec v0.19.0 // indirect
4545
github.com/hashicorp/terraform-json v0.17.1 // indirect
@@ -57,19 +57,19 @@ require (
5757
github.com/oklog/run v1.1.0 // indirect
5858
github.com/pmezard/go-difflib v1.0.0 // indirect
5959
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
60-
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
60+
github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect
6161
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
6262
go.opencensus.io v0.24.0 // indirect
63-
golang.org/x/crypto v0.13.0 // indirect
64-
golang.org/x/net v0.15.0 // indirect
65-
golang.org/x/oauth2 v0.12.0 // indirect
66-
golang.org/x/sys v0.12.0 // indirect
63+
golang.org/x/crypto v0.14.0 // indirect
64+
golang.org/x/net v0.17.0 // indirect
65+
golang.org/x/oauth2 v0.13.0 // indirect
66+
golang.org/x/sys v0.13.0 // indirect
6767
golang.org/x/text v0.13.0 // indirect
6868
golang.org/x/time v0.3.0 // indirect
69-
google.golang.org/api v0.140.0 // indirect
69+
google.golang.org/api v0.146.0 // indirect
7070
google.golang.org/appengine v1.6.8 // indirect
71-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 // indirect
72-
google.golang.org/grpc v1.58.0 // indirect
71+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
72+
google.golang.org/grpc v1.58.3 // indirect
7373
google.golang.org/protobuf v1.31.0 // indirect
7474
gopkg.in/ini.v1 v1.67.0 // indirect
7575
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)