Skip to content

Commit 512c504

Browse files
authored
Merge branch 'main' into feat/STACKITCLI-357-edgecloud-sdk-migration
2 parents 91826ac + eacc4cd commit 512c504

5 files changed

Lines changed: 40 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
pull-requests: write # write permission needed to comment on PR
6666
steps:
6767
- name: Check new code coverage
68-
uses: fgrosse/go-coverage-report@v1.3.0
68+
uses: fgrosse/go-coverage-report@v1.3.1
6969
continue-on-error: true # Add this line to prevent pipeline failures in forks
7070
with:
7171
coverage-artifact-name: ${{ env.CODE_COVERAGE_ARTIFACT_NAME }}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ require (
4141
github.com/zalando/go-keyring v0.2.8
4242
golang.org/x/mod v0.38.0
4343
golang.org/x/oauth2 v0.36.0
44-
golang.org/x/term v0.44.0
44+
golang.org/x/term v0.45.0
4545
golang.org/x/text v0.40.0
4646
k8s.io/apimachinery v0.36.2
4747
k8s.io/client-go v0.36.2
@@ -274,7 +274,7 @@ require (
274274
github.com/stackitcloud/stackit-sdk-go/services/redis v1.1.0
275275
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0
276276
github.com/subosito/gotenv v1.6.0 // indirect
277-
golang.org/x/sys v0.46.0 // indirect
277+
golang.org/x/sys v0.47.0 // indirect
278278
gopkg.in/yaml.v3 v3.0.1 // indirect
279279
k8s.io/api v0.36.2 // indirect
280280
k8s.io/klog/v2 v2.140.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -905,8 +905,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
905905
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
906906
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
907907
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
908-
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
909-
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
908+
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
909+
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
910910
golang.org/x/telemetry v0.0.0-20260625142307-59b4966ccb57 h1:nwGZBCt+FnXUrGsj5vjzAsEmkcaFvd82BbOjECiFYZc=
911911
golang.org/x/telemetry v0.0.0-20260625142307-59b4966ccb57/go.mod h1:3AWMyWHS+caVoiEXpiq6+tzKA40J4vQT3MYr80ZtQpc=
912912
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -915,8 +915,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
915915
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
916916
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
917917
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
918-
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
919-
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
918+
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
919+
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
920920
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
921921
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
922922
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

internal/cmd/beta/sqlserverflex/instance/create/create.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient sqlserverfle
217217
return req, err
218218
}
219219

220+
if model.ACL == nil {
221+
model.ACL = make([]string, 0)
222+
}
223+
220224
req = req.CreateInstancePayload(sqlserverflex.CreateInstancePayload{
221225
Name: model.InstanceName,
222226
Network: sqlserverflex.CreateInstancePayloadNetwork{

internal/cmd/beta/sqlserverflex/instance/create/create_test.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,35 @@ func TestBuildRequest(t *testing.T) {
419419
},
420420
isValid: false,
421421
},
422+
{
423+
description: "nil acl",
424+
model: fixtureInputModel(
425+
func(model *inputModel) {
426+
model.ACL = nil
427+
}),
428+
listFlavorsResp: &sqlserverflex.ListFlavorsResponse{
429+
Flavors: []sqlserverflex.ListFlavors{
430+
{
431+
Id: testFlavorId,
432+
Cpu: int64(2),
433+
Memory: int64(4),
434+
},
435+
},
436+
},
437+
listStoragesResp: &sqlserverflex.ListStoragesResponse{
438+
StorageClasses: []sqlserverflex.FlavorStorageClassesStorageClass{{
439+
Class: "storage-class",
440+
}},
441+
StorageRange: sqlserverflex.FlavorStorageRange{
442+
Min: 10,
443+
Max: 100,
444+
},
445+
},
446+
isValid: true,
447+
expectedRequest: testClient.DefaultAPI.CreateInstance(testCtx, testProjectId, testRegion).CreateInstancePayload(fixturePayload(func(payload *sqlserverflex.CreateInstancePayload) {
448+
payload.Network.Acl = make([]string, 0)
449+
})),
450+
},
422451
}
423452

424453
for _, tt := range tests {

0 commit comments

Comments
 (0)