Skip to content

Commit ae2f4fd

Browse files
committed
Merge branch 'main' into fix/use-go-sdk-for-databricks_mws_workspaces
2 parents 77621c6 + 1e3e8ce commit ae2f4fd

8 files changed

+432
-535
lines changed

.release_metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"timestamp": "2025-04-10 13:36:07+0000"
2+
"timestamp": "2025-04-07 14:32:14+0000"
33
}

CHANGELOG.md

-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
# Version changelog
22

3-
## Release v1.73.0
4-
5-
### New Features and Improvements
6-
7-
* Add a new settings resource `databricks_disable_legacy_dbfs_setting` ([#4605](https://github.com/databricks/terraform-provider-databricks/pull/4605))
8-
9-
### Bug Fixes
10-
11-
* Increase the default HTTP timeout to 65 seconds.
12-
13-
### Documentation
14-
15-
* Document `user_api_scopes` in `databricks_app` resource and data sources ([#4614](https://github.com/databricks/terraform-provider-databricks/pull/4614))
16-
* Document new fields in `databricks_model_serving` resource ([#4615](https://github.com/databricks/terraform-provider-databricks/pull/4615))
17-
18-
### Exporter
19-
20-
* Add export of `databricks_mws_network_connectivity_config` and `databricks_mws_ncc_private_endpoint_rule` ([#4613](https://github.com/databricks/terraform-provider-databricks/pull/4613))
21-
22-
### Internal Changes
23-
24-
* Add `TestMwsAccGcpWorkspaces` and `TestMwsAccGcpByovpcWorkspaces` to flaky test ([#4624](https://github.com/databricks/terraform-provider-databricks/pull/4624)).
25-
26-
273
## Release v1.72.0
284

295
### New Features and Improvements

NEXT_CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# NEXT CHANGELOG
22

3-
## Release v1.74.0
3+
## Release v1.73.0
44

55
### New Features and Improvements
66

7+
* Add a new settings resource `databricks_disable_legacy_dbfs_setting` ([#4605](https://github.com/databricks/terraform-provider-databricks/pull/4605))
8+
79
### Bug Fixes
810

11+
* Increase the default HTTP timeout to 65 seconds.
12+
913
### Documentation
1014

15+
* Document `user_api_scopes` in `databricks_app` resource and data sources ([#4614](https://github.com/databricks/terraform-provider-databricks/pull/4614))
16+
* Document new fields in `databricks_model_serving` resource ([#4615](https://github.com/databricks/terraform-provider-databricks/pull/4615))
17+
1118
### Exporter
1219

20+
* Add export of `databricks_mws_network_connectivity_config` and `databricks_mws_ncc_private_endpoint_rule` ([#4613](https://github.com/databricks/terraform-provider-databricks/pull/4613))
21+
1322
### Internal Changes
1423

1524
* Refactor `databricks_mws_workspaces` resource and datasource, as well as `databricks_mws_ncc_binding`, to use the Go SDK ([#4633](https://github.com/databricks/terraform-provider-databricks/pull/4633)).
25+
* Add `TestMwsAccGcpWorkspaces` and `TestMwsAccGcpByovpcWorkspaces` to flaky test ([#4624](https://github.com/databricks/terraform-provider-databricks/pull/4624)).

common/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package common
33
import "context"
44

55
var (
6-
version = "1.73.0"
6+
version = "1.72.0"
77
// ResourceName is resource name without databricks_ prefix
88
ResourceName contextKey = 1
99
// Provider is the current instance of provider

workspace/data_directory_test.go

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
package workspace
22

33
import (
4+
"errors"
45
"testing"
56

7+
"github.com/databricks/databricks-sdk-go/experimental/mocks"
8+
ws_api "github.com/databricks/databricks-sdk-go/service/workspace"
69
"github.com/databricks/terraform-provider-databricks/qa"
10+
"github.com/stretchr/testify/mock"
711
)
812

913
func TestDataSourceDirectory(t *testing.T) {
1014
qa.ResourceFixture{
11-
Fixtures: []qa.HTTPFixture{
12-
{
13-
Method: "GET",
14-
Resource: "/api/2.0/workspace/get-status?path=%2Fa%2Fb%2Fc",
15-
Response: ObjectStatus{
16-
ObjectID: 987,
17-
ObjectType: "DIRECTORY",
15+
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
16+
w.GetMockWorkspaceAPI().EXPECT().
17+
GetStatusByPath(mock.Anything, "/a/b/c").
18+
Return(&ws_api.ObjectInfo{
19+
ObjectId: 987,
20+
ObjectType: ws_api.ObjectTypeDirectory,
1821
Path: "/a/b/c",
19-
},
20-
},
22+
}, nil)
2123
},
2224
Read: true,
2325
NonWritable: true,
@@ -35,17 +37,15 @@ func TestDataSourceDirectory(t *testing.T) {
3537

3638
func TestDataSourceDirectory_NotDirectory(t *testing.T) {
3739
qa.ResourceFixture{
38-
Fixtures: []qa.HTTPFixture{
39-
{
40-
Method: "GET",
41-
Resource: "/api/2.0/workspace/get-status?path=%2Fa%2Fb%2Fc",
42-
Response: ObjectStatus{
43-
ObjectID: 987,
44-
Language: "PYTHON",
45-
ObjectType: "NOTEBOOK",
40+
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
41+
w.GetMockWorkspaceAPI().EXPECT().
42+
GetStatusByPath(mock.Anything, "/a/b/c").
43+
Return(&ws_api.ObjectInfo{
44+
ObjectId: 987,
45+
Language: ws_api.LanguagePython,
46+
ObjectType: ws_api.ObjectTypeNotebook,
4647
Path: "/a/b/c",
47-
},
48-
},
48+
}, nil)
4949
},
5050
Read: true,
5151
NonWritable: true,
@@ -59,7 +59,11 @@ func TestDataSourceDirectory_NotDirectory(t *testing.T) {
5959

6060
func TestDataSourceDirectory_Error(t *testing.T) {
6161
qa.ResourceFixture{
62-
Fixtures: qa.HTTPFailures,
62+
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
63+
w.GetMockWorkspaceAPI().EXPECT().
64+
GetStatusByPath(mock.Anything, "/a/b/c").
65+
Return(nil, errors.New("i'm a teapot"))
66+
},
6367
Read: true,
6468
NonWritable: true,
6569
Resource: DataSourceDirectory(),

0 commit comments

Comments
 (0)