From d8c8682faeb4537231f5203247b4d50f54aea696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarne=20Schr=C3=B6der?= Date: Mon, 10 Aug 2026 15:28:03 +0200 Subject: [PATCH 1/3] feat(dremio): Adding wait handlers to v1betaapi Copying over the wait handlers from v1alphaapi to make waiting for provisioning of dremio resources possible. --- CHANGELOG.md | 3 + examples/dremio/dremio.go | 4 +- services/dremio/CHANGELOG.md | 3 + services/dremio/VERSION | 2 +- services/dremio/v1betaapi/wait/wait.go | 141 ++++++ services/dremio/v1betaapi/wait/wait_test.go | 487 ++++++++++++++++++++ 6 files changed, 637 insertions(+), 3 deletions(-) create mode 100644 services/dremio/v1betaapi/wait/wait.go create mode 100644 services/dremio/v1betaapi/wait/wait_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 668143350..9667140c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,9 @@ - `v1api`: - **Breaking Change:** `Value` field of `Label`/`CreateLabelPayload` changed from `string` to `*string` and is no longer required. `NewLabel`/`NewCreateLabelPayload` drop the `value` param - `dremio`: + - [v0.6.0](services/dremio/CHANGELOG.md#v060) + - `v1betaapi`: + - **Feature:** Added wait handlers - [v0.5.1](services/dremio/CHANGELOG.md#v051) - `v1alphaapi`: - **Fix:** Response decoding now supports `*io.Reader` and `*[]byte` target types (previously only `string`, `*os.File`, and JSON were supported) diff --git a/examples/dremio/dremio.go b/examples/dremio/dremio.go index 8d58dde7f..5e0993250 100644 --- a/examples/dremio/dremio.go +++ b/examples/dremio/dremio.go @@ -7,8 +7,8 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/config" "github.com/stackitcloud/stackit-sdk-go/core/utils" - dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi" - "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi/wait" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaappi" + "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaappi/wait" ) func main() { diff --git a/services/dremio/CHANGELOG.md b/services/dremio/CHANGELOG.md index 7e16cc2d9..fd218daae 100644 --- a/services/dremio/CHANGELOG.md +++ b/services/dremio/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.6.0 +-`v1betaapi`: Added wait handlers + ## v0.5.1 - `v1alphaapi`: - **Fix:** Response decoding now supports `*io.Reader` and `*[]byte` target types (previously only `string`, `*os.File`, and JSON were supported) diff --git a/services/dremio/VERSION b/services/dremio/VERSION index 992ac75e2..60f634328 100644 --- a/services/dremio/VERSION +++ b/services/dremio/VERSION @@ -1 +1 @@ -v0.5.1 +v0.6.0 diff --git a/services/dremio/v1betaapi/wait/wait.go b/services/dremio/v1betaapi/wait/wait.go new file mode 100644 index 000000000..025f70a56 --- /dev/null +++ b/services/dremio/v1betaapi/wait/wait.go @@ -0,0 +1,141 @@ +package wait + +import ( + "context" + "errors" + "net/http" + "time" + + "github.com/stackitcloud/stackit-sdk-go/core/wait" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi" +) + +const ( + // Deprecated: symbol is not used anymore, use the packages enum instead, will be removed 2026-12, use `go fix` for automatic fixing + //go:fix inline + DREMIOSTATE_ACTIVE = dremio.DREMIORESPONSESTATE_ACTIVE + // Deprecated: symbol is not used anymore, use the packages enum instead, will be removed 2026-12, use `go fix` for automatic fixing + //go:fix inline + DREMIOSTATE_ERROR = dremio.DREMIORESPONSESTATE_ERROR + + // Deprecated: symbol is not used anymore, use the packages enum instead, will be removed 2026-12, use `go fix` for automatic fixing + //go:fix inline + DREMIOUSERSTATE_ACTIVE = dremio.DREMIOUSERRESPONSESTATE_ACTIVE + // Deprecated: symbol is not used anymore, use the packages enum instead, will be removed 2026-12, use `go fix` for automatic fixing + //go:fix inline + DREMIOUSERSTATE_ERROR = dremio.DREMIOUSERRESPONSESTATE_ERROR +) + +// CreateDremioWaitHandler will wait for the creation of a Dremio instance +func CreateDremioWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId string) *wait.AsyncActionHandler[dremio.DremioResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioResponse, dremio.DremioResponseState]{ + FetchInstance: a.GetDremioInstance(ctx, projectId, regionId, dremioId).Execute, + GetState: func(dremioResp *dremio.DremioResponse) (dremio.DremioResponseState, error) { + if dremioResp == nil { + return "", errors.New("empty response") + } + return dremioResp.State, nil + }, + ActiveState: []dremio.DremioResponseState{dremio.DREMIORESPONSESTATE_ACTIVE}, + ErrorState: []dremio.DremioResponseState{dremio.DREMIORESPONSESTATE_ERROR}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(30 * time.Minute) + return handler +} + +// UpdateDremioWaitHandler will wait an update of a Dremio instance +func UpdateDremioWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId string) *wait.AsyncActionHandler[dremio.DremioResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioResponse, dremio.DremioResponseState]{ + FetchInstance: a.GetDremioInstance(ctx, projectId, regionId, dremioId).Execute, + GetState: func(dremioResp *dremio.DremioResponse) (dremio.DremioResponseState, error) { + if dremioResp == nil { + return "", errors.New("empty response") + } + return dremioResp.State, nil + }, + ActiveState: []dremio.DremioResponseState{dremio.DREMIORESPONSESTATE_ACTIVE}, + ErrorState: []dremio.DremioResponseState{dremio.DREMIORESPONSESTATE_ERROR}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(30 * time.Minute) + return handler +} + +// DeleteDremioWaitHandler will wait for the deletion of a Dremio instance +func DeleteDremioWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId string) *wait.AsyncActionHandler[dremio.DremioResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioResponse, dremio.DremioResponseState]{ + FetchInstance: a.GetDremioInstance(ctx, projectId, regionId, dremioId).Execute, + GetState: func(dremioResp *dremio.DremioResponse) (dremio.DremioResponseState, error) { + if dremioResp == nil { + return "", errors.New("empty response") + } + return dremioResp.State, nil + }, + ErrorState: []dremio.DremioResponseState{dremio.DREMIORESPONSESTATE_ERROR}, + DeleteHttpErrorStatusCodes: []int{http.StatusNotFound}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(30 * time.Minute) + return handler +} + +// CreateDremioUserWaitHandler will wait for the creation of a Dremio user +func CreateDremioUserWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId, dremioUserId string) *wait.AsyncActionHandler[dremio.DremioUserResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioUserResponse, dremio.DremioUserResponseState]{ + FetchInstance: a.GetDremioUser(ctx, projectId, regionId, dremioId, dremioUserId).Execute, + GetState: func(user *dremio.DremioUserResponse) (dremio.DremioUserResponseState, error) { + if user == nil { + return "", errors.New("empty response") + } + return user.State, nil + }, + ActiveState: []dremio.DremioUserResponseState{dremio.DREMIOUSERRESPONSESTATE_ACTIVE}, + ErrorState: []dremio.DremioUserResponseState{dremio.DREMIOUSERRESPONSESTATE_ERROR}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(10 * time.Minute) + return handler +} + +// UpdateDremioUserWaitHandler will wait for an update to a Dremio user +func UpdateDremioUserWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId, dremioUserId string) *wait.AsyncActionHandler[dremio.DremioUserResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioUserResponse, dremio.DremioUserResponseState]{ + FetchInstance: a.GetDremioUser(ctx, projectId, regionId, dremioId, dremioUserId).Execute, + GetState: func(user *dremio.DremioUserResponse) (dremio.DremioUserResponseState, error) { + if user == nil { + return "", errors.New("empty response") + } + return user.State, nil + }, + ActiveState: []dremio.DremioUserResponseState{dremio.DREMIOUSERRESPONSESTATE_ACTIVE}, + ErrorState: []dremio.DremioUserResponseState{dremio.DREMIOUSERRESPONSESTATE_ERROR}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(10 * time.Minute) + return handler +} + +// DeleteDremioUserWaitHandler will wait for a deletion of a Dremio user +func DeleteDremioUserWaitHandler(ctx context.Context, a dremio.DefaultAPI, projectId, regionId, dremioId, dremioUserId string) *wait.AsyncActionHandler[dremio.DremioUserResponse] { + waitConfig := wait.WaiterHelper[dremio.DremioUserResponse, dremio.DremioUserResponseState]{ + FetchInstance: a.GetDremioUser(ctx, projectId, regionId, dremioId, dremioUserId).Execute, + GetState: func(user *dremio.DremioUserResponse) (dremio.DremioUserResponseState, error) { + if user == nil { + return "", errors.New("empty response") + } + return user.State, nil + }, + ErrorState: []dremio.DremioUserResponseState{dremio.DREMIOUSERRESPONSESTATE_ERROR}, + DeleteHttpErrorStatusCodes: []int{http.StatusNotFound}, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(10 * time.Minute) + return handler +} diff --git a/services/dremio/v1betaapi/wait/wait_test.go b/services/dremio/v1betaapi/wait/wait_test.go new file mode 100644 index 000000000..5a694fe56 --- /dev/null +++ b/services/dremio/v1betaapi/wait/wait_test.go @@ -0,0 +1,487 @@ +package wait + +import ( + "context" + "net/http" + "testing" + "testing/synctest" + + "github.com/google/go-cmp/cmp" + + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" + "github.com/stackitcloud/stackit-sdk-go/core/utils" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi" +) + +type mockSettings struct { + isDeleted bool + getFails bool + resourceState string +} + +func newAPIMock(settings mockSettings) dremio.DefaultAPI { + return &dremio.DefaultAPIServiceMock{ + GetDremioInstanceExecuteMock: utils.Ptr( + func(_ dremio.ApiGetDremioInstanceRequest) (*dremio.DremioResponse, error) { + if settings.isDeleted { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: http.StatusNotFound, + } + } + if settings.getFails { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: 500, + } + } + + return &dremio.DremioResponse{ + State: dremio.DremioResponseState(settings.resourceState), + }, nil + }, + ), + GetDremioUserExecuteMock: utils.Ptr( + func(_ dremio.ApiGetDremioUserRequest) (*dremio.DremioUserResponse, error) { + if settings.isDeleted { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: http.StatusNotFound, + } + } + if settings.getFails { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: 500, + } + } + + return &dremio.DremioUserResponse{ + State: dremio.DremioUserResponseState(settings.resourceState), + }, nil + }, + ), + } +} + +func TestCreateDremioWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "create_succeeded", + getFails: false, + resourceState: string(dremio.DREMIORESPONSESTATE_ACTIVE), + wantError: false, + wantResponse: true, + }, + { + description: "create_failed", + getFails: false, + resourceState: string(dremio.DREMIORESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: false, + }) + + var expectedResponse *dremio.DremioResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioResponse{ + State: dremio.DremioResponseState(currentTest.resourceState), + } + } + + handler := CreateDremioWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + if !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} + +func TestUpdateDremioWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "update_succeeded", + getFails: false, + resourceState: string(dremio.DREMIORESPONSESTATE_ACTIVE), + wantError: false, + wantResponse: true, + }, + { + description: "update_failed", + getFails: false, + resourceState: string(dremio.DREMIORESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: false, + }) + + var expectedResponse *dremio.DremioResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioResponse{ + State: dremio.DremioResponseState(currentTest.resourceState), + } + } + + handler := UpdateDremioWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + if !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} + +func TestDeleteDremioWaitHandler(t *testing.T) { + tests := []struct { + description string + isDeleted bool + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "delete_succeeded", + isDeleted: true, + getFails: false, + resourceState: "", + wantError: false, + wantResponse: false, + }, + { + description: "delete_failed", + isDeleted: false, + getFails: false, + resourceState: string(dremio.DREMIORESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + isDeleted: false, + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + isDeleted: false, + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: currentTest.isDeleted, + }) + + var expectedResponse *dremio.DremioResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioResponse{ + State: dremio.DremioResponseState(currentTest.resourceState), + } + } + + handler := DeleteDremioWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + + if !currentTest.wantResponse && gotResponse != nil { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + if currentTest.wantResponse && !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} + +func TestCreateDremioUserWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "create_succeeded", + getFails: false, + resourceState: string(dremio.DREMIOUSERRESPONSESTATE_ACTIVE), + wantError: false, + wantResponse: true, + }, + { + description: "create_failed", + getFails: false, + resourceState: string(dremio.DREMIOUSERRESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: false, + }) + + var expectedResponse *dremio.DremioUserResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioUserResponse{ + State: dremio.DremioUserResponseState(currentTest.resourceState), + } + } + + handler := CreateDremioUserWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId", "userId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + if !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} + +func TestUpdateDremioUserWaitHandler(t *testing.T) { + tests := []struct { + description string + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "update_succeeded", + getFails: false, + resourceState: string(dremio.DREMIOUSERRESPONSESTATE_ACTIVE), + wantError: false, + wantResponse: true, + }, + { + description: "update_failed", + getFails: false, + resourceState: string(dremio.DREMIOUSERRESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: false, + }) + + var expectedResponse *dremio.DremioUserResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioUserResponse{ + State: dremio.DremioUserResponseState(currentTest.resourceState), + } + } + + handler := UpdateDremioUserWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId", "userId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + if !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} + +func TestDeleteDremioUserWaitHandler(t *testing.T) { + tests := []struct { + description string + isDeleted bool + getFails bool + resourceState string + wantError bool + wantResponse bool + }{ + { + description: "delete_succeeded", + isDeleted: true, + getFails: false, + resourceState: "", + wantError: false, + wantResponse: false, + }, + { + description: "delete_failed", + isDeleted: false, + getFails: false, + resourceState: string(dremio.DREMIOUSERRESPONSESTATE_ERROR), + wantError: true, + wantResponse: true, + }, + { + description: "get_fails", + isDeleted: false, + getFails: true, + resourceState: "", + wantError: true, + wantResponse: false, + }, + { + description: "timeout", + isDeleted: false, + getFails: false, + resourceState: "ANOTHER STATE", + wantError: true, + wantResponse: false, + }, + } + for _, currentTest := range tests { + t.Run(currentTest.description, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + apiClient := newAPIMock(mockSettings{ + getFails: currentTest.getFails, + resourceState: currentTest.resourceState, + isDeleted: currentTest.isDeleted, + }) + + var expectedResponse *dremio.DremioUserResponse + if currentTest.wantResponse { + expectedResponse = &dremio.DremioUserResponse{ + State: dremio.DremioUserResponseState(currentTest.resourceState), + } + } + + handler := DeleteDremioUserWaitHandler(context.Background(), apiClient, "pid", "zid", "dremioId", "userId") + + gotResponse, err := handler.WaitWithContext(context.Background()) + + if (err != nil) != currentTest.wantError { + t.Fatalf("handler error = %v, wantErr %v", err, currentTest.wantError) + } + + if !currentTest.wantResponse && gotResponse != nil { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + if currentTest.wantResponse && !cmp.Equal(gotResponse, expectedResponse) { + t.Fatalf("handler gotResponse = %v, expectedResponse = %v", gotResponse, expectedResponse) + } + }) + }) + } +} From 78b4b434e0b4024f297f57402517c10716842061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarne=20Schr=C3=B6der?= Date: Mon, 10 Aug 2026 15:33:28 +0200 Subject: [PATCH 2/3] fix(dremio): Correcting typo on import statement in example code --- examples/dremio/dremio.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dremio/dremio.go b/examples/dremio/dremio.go index 5e0993250..7f022eff5 100644 --- a/examples/dremio/dremio.go +++ b/examples/dremio/dremio.go @@ -7,8 +7,8 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/config" "github.com/stackitcloud/stackit-sdk-go/core/utils" - dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaappi" - "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaappi/wait" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaapi" + "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaapi/wait" ) func main() { From 67543e975431f09a498ee82e51c2ea394ee6a476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarne=20Schr=C3=B6der?= Date: Tue, 11 Aug 2026 15:39:11 +0200 Subject: [PATCH 3/3] fix: Implementing PR comments --- services/dremio/CHANGELOG.md | 5 +++-- services/dremio/v1betaapi/wait/wait.go | 2 +- services/dremio/v1betaapi/wait/wait_test.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/dremio/CHANGELOG.md b/services/dremio/CHANGELOG.md index fd218daae..cd3ac3e81 100644 --- a/services/dremio/CHANGELOG.md +++ b/services/dremio/CHANGELOG.md @@ -1,5 +1,6 @@ ## v0.6.0 --`v1betaapi`: Added wait handlers +-`v1betaapi`: + - **Feature**: Added wait handlers ## v0.5.1 - `v1alphaapi`: @@ -23,4 +24,4 @@ - Manage your STACKIT Dremio resources: `DremioInstance`, `DremioUser` - Waiters for async operations: `CreateDremioInstanceWaitHandler`, `UpdateDremioInstanceWaitHandler`, `DeleteDremioInstanceWaitHandler`, `CreateDremioUserWaitHandler`, `UpdateDremioUserWaitHandler`, `DeleteDremioUserWaitHandler` -- [Usage example](https://github.com/stackitcloud/stackit-sdk-go/tree/main/examples/dremio) \ No newline at end of file +- [Usage example](https://github.com/stackitcloud/stackit-sdk-go/tree/main/examples/dremio) diff --git a/services/dremio/v1betaapi/wait/wait.go b/services/dremio/v1betaapi/wait/wait.go index 025f70a56..9ea47ec52 100644 --- a/services/dremio/v1betaapi/wait/wait.go +++ b/services/dremio/v1betaapi/wait/wait.go @@ -7,7 +7,7 @@ import ( "time" "github.com/stackitcloud/stackit-sdk-go/core/wait" - dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaapi" ) const ( diff --git a/services/dremio/v1betaapi/wait/wait_test.go b/services/dremio/v1betaapi/wait/wait_test.go index 5a694fe56..b0747aa11 100644 --- a/services/dremio/v1betaapi/wait/wait_test.go +++ b/services/dremio/v1betaapi/wait/wait_test.go @@ -10,7 +10,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/oapierror" "github.com/stackitcloud/stackit-sdk-go/core/utils" - dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1alphaapi" + dremio "github.com/stackitcloud/stackit-sdk-go/services/dremio/v1betaapi" ) type mockSettings struct {