Skip to content

Commit 1703e10

Browse files
Merge branch 'main' into feat/STACKITCLI-414-sqlserverflex-flavor-pagination
2 parents 5a33359 + d98996f commit 1703e10

43 files changed

Lines changed: 228 additions & 245 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v7.0.0
20+
uses: actions/checkout@v7.0.1
2121

2222
- name: Install go
2323
uses: actions/setup-go@v7.0.0
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v7.0.0
50+
uses: actions/checkout@v7.0.1
5151

5252
- name: Check GoReleaser
5353
uses: goreleaser/goreleaser-action@v7.2.3

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v7.0.0
26+
uses: actions/checkout@v7.0.1
2727
with:
2828
# Allow goreleaser to access older tag information.
2929
fetch-depth: 0
@@ -106,7 +106,7 @@ jobs:
106106
AWS_SECRET_ACCESS_KEY: ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
107107
steps:
108108
- name: Checkout
109-
uses: actions/checkout@v7.0.0
109+
uses: actions/checkout@v7.0.1
110110

111111
# use the artifacts from the "goreleaser" job
112112
- name: Download artifacts from workflow
@@ -144,7 +144,7 @@ jobs:
144144
AWS_ENDPOINT_URL: https://object.storage.eu01.onstackit.cloud
145145
steps:
146146
- name: Checkout
147-
uses: actions/checkout@v7.0.0
147+
uses: actions/checkout@v7.0.1
148148

149149
- name: Download artifacts from workflow
150150
uses: actions/download-artifact@v8

.goreleaser.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,3 @@ snapcrafts:
155155
grade: stable
156156
# Whether to publish the Snap to the store
157157
publish: true
158-
159-
winget:
160-
- name: stackit
161-
publisher: stackitcloud
162-
short_description: A command-line interface to manage STACKIT resources.
163-
license: Apache-2.0
164-
publisher_support_url: "https://github.com/stackitcloud/stackit-cli/issues"
165-
package_identifier: stackitcloud.stackit
166-
homepage: "https://github.com/stackitcloud/stackit-cli"
167-
# If set to auto, the release will not be uploaded to the homebrew tap repo
168-
# if the tag has a prerelease indicator (e.g. v0.0.1-alpha1)
169-
# Temporarily not skipping prereleases to test integration with Winget
170-
# skip_upload: auto
171-
repository:
172-
owner: stackitcloud
173-
name: winget-pkgs
174-
pull_request:
175-
enabled: true
176-
base:
177-
owner: microsoft
178-
name: winget-pkgs
179-
branch: master

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![Go Report Card](https://goreportcard.com/badge/github.com/stackitcloud/stackit-cli)](https://goreportcard.com/report/github.com/stackitcloud/stackit-cli) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/stackitcloud/stackit-cli) [![GitHub License](https://img.shields.io/github/license/stackitcloud/stackit-cli)](https://www.apache.org/licenses/LICENSE-2.0)
1111

12-
Welcome to the STACKIT CLI, a command-line interface for [STACKIT - The sovereign cloud for Europe](https://www.stackit.de/en).
12+
Welcome to the STACKIT CLI, a command-line interface for [STACKIT - The sovereign cloud for Europe](https://www.stackit.com/).
1313

1414
The STACKIT CLI allows you to manage your STACKIT services and resources as well as perform operations using the command-line or in scripts or automation, such as:
1515

@@ -206,7 +206,7 @@ Apache 2.0
206206

207207
- [STACKIT Portal](https://portal.stackit.cloud/)
208208

209-
- [STACKIT](https://www.stackit.de/en/)
209+
- [STACKIT](https://www.stackit.com/)
210210

211211
- [STACKIT Docs](https://docs.stackit.cloud/)
212212

SECURITY.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/stackit_service-account_token_create.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ stackit service-account token create [flags]
2525
### Options
2626

2727
```
28-
-e, --email string Service account email
29-
-h, --help Help for "stackit service-account token create"
30-
--ttl-days int How long (in days) the new access token is valid (default 90)
28+
-e, --email string Service account email
29+
-h, --help Help for "stackit service-account token create"
30+
--ttl-days int32 How long (in days) the new access token is valid (default 90)
3131
```
3232

3333
### Options inherited from parent commands

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ require (
2727
github.com/stackitcloud/stackit-sdk-go/services/logs v0.10.0
2828
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.12.0
2929
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0
30-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0
30+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0
3131
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.0
3232
github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.8.0
3333
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.18.1
3434
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.7.0
3535
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.2
36-
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0
36+
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.20.0
3737
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0
38-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0
38+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0
3939
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1
4040
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
4141
github.com/zalando/go-keyring v0.2.8

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ github.com/stackitcloud/stackit-sdk-go/services/observability v0.24.0 h1:KhuWPXr
626626
github.com/stackitcloud/stackit-sdk-go/services/observability v0.24.0/go.mod h1:0fEZQHm729mBdvg4sNrAhM6KmHROHJSeS2FwCMRk46k=
627627
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0 h1:hooc/E9Qabn8xno1NUd3uJQfUbW5KoY6mgURlnd776c=
628628
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0/go.mod h1:L+NlfC1hilLOqlLLukCj/UDnxlnNrc/oMikcw3Ansyw=
629-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0 h1:cuI4NhuFhaZ3tTkBpUM7nt2odKFJkyCcphT/3gGb9CE=
630-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0/go.mod h1:yzlakB+f8ur4yAHR6lyCABO+HcEtZG3G2Faj6m5/uW8=
629+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0 h1:elIyrDVSYlEtigFO82SWnpfuJZdpv0b2SwvL3M+z9dA=
630+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0/go.mod h1:yzlakB+f8ur4yAHR6lyCABO+HcEtZG3G2Faj6m5/uW8=
631631
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v1.1.1 h1:Vly7OKWAwfrbE31N/tUMmLkl7pKybSnek0IPh8offRk=
632632
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v1.1.1/go.mod h1:TwfVVynB/+AKbccSOLk2qZpPL1tdK43BBAiACP6EtSg=
633633
github.com/stackitcloud/stackit-sdk-go/services/redis v1.1.0 h1:ckYMRXAGE2/vaxPeNGEuun9AGcFn/8xuu0ytfsiqfWU=
@@ -642,14 +642,14 @@ github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.7.0 h1:U3bm+RVHD
642642
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.7.0/go.mod h1:BJeafbecuocdirGCAJ2Vz/rPSK/LRrB5lPBEacqd1eU=
643643
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.2 h1:6C/iTPoYPCrZOc3JMmvyDNs4hm+JR5p9O3DIfFGgnbo=
644644
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.2/go.mod h1:/OHYZXQb9KXDdZK5J9C2YS6DJUD2i6ednZ1rK7zpDZ0=
645-
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0 h1:l1EDIlXce2C8JcbBDHVa6nZ4SjPTqmnALTgrhms+NKI=
646-
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0/go.mod h1:EXq8/J7t9p8zPmdIq+atuxyAbnQwxrQT18fI+Qpv98k=
645+
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.20.0 h1:4/xfpcqHLkKkaVS/HOOIWa3n7Z/O0DysPc+/+FVSltE=
646+
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.20.0/go.mod h1:xJNa86o89czK2o60+s46vz8+NSKDTbQduFGFaztJnsA=
647647
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0 h1:TNZHrunhsXRbuqZcucLs2Gqy1sEyvabufM7pB5Tscmo=
648648
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0/go.mod h1:fXq3TmVLb4JMSve989NFFViMFoYa83s7M3hJWgN6mdQ=
649649
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0 h1:JWAFnskRbNKT8x62pZcAMCC+p5hyTEkAyxqFwy39jFA=
650650
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0/go.mod h1:jMlBoXqrPNX5nXbo6oT7exalqilw1jiLPoIp4Cn0CdI=
651-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0 h1:QoKyQPe8FqDqJLNgE5uRlZ/y1c1GUxjV1DDLu5QEBD8=
652-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0/go.mod h1:KhVYCR58wETqdI7Quwhe3OR3BhB2T/b7DzaMsfDnr8g=
651+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0 h1:eu9PhRdL2GkXpHtf4NN9YBCUYcARdvAwq+g/FW4hmi4=
652+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0/go.mod h1:TbqmZhLMofmfl+HhVl6oHYcI3zvXTm1vRjN3A/fOkM4=
653653
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1 h1:pjFVw2Tc0cSfAzmyZRiLknuKSADs7nPXNUyrM216CwQ=
654654
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
655655
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=

internal/cmd/network/update/update.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *iaas.APICli
180180
var payloadIPv6 *iaas.UpdateNetworkIPv6Body
181181

182182
if model.IPv6DnsNameServers != nil || model.NoIPv6Gateway || model.IPv6Gateway != nil {
183-
payloadIPv6 = &iaas.UpdateNetworkIPv6Body{
184-
Nameservers: *model.IPv6DnsNameServers,
183+
payloadIPv6 = &iaas.UpdateNetworkIPv6Body{}
184+
185+
if model.IPv6DnsNameServers != nil {
186+
payloadIPv6.Nameservers = *model.IPv6DnsNameServers
185187
}
186188

187189
if model.NoIPv6Gateway {
@@ -192,8 +194,10 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *iaas.APICli
192194
}
193195

194196
if model.IPv4DnsNameServers != nil || model.NoIPv4Gateway || model.IPv4Gateway != nil {
195-
payloadIPv4 = &iaas.UpdateNetworkIPv4Body{
196-
Nameservers: *model.IPv4DnsNameServers,
197+
payloadIPv4 = &iaas.UpdateNetworkIPv4Body{}
198+
199+
if model.IPv4DnsNameServers != nil {
200+
payloadIPv4.Nameservers = *model.IPv4DnsNameServers
197201
}
198202

199203
if model.NoIPv4Gateway {

internal/cmd/network/update/update_test.go

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
8080
return model
8181
}
8282

83-
func fixtureRequest(mods ...func(request *iaas.ApiPartialUpdateNetworkRequest)) iaas.ApiPartialUpdateNetworkRequest {
83+
func fixtureRequest(mods ...func(payload *iaas.PartialUpdateNetworkPayload)) iaas.ApiPartialUpdateNetworkRequest {
8484
request := testClient.DefaultAPI.PartialUpdateNetwork(testCtx, testProjectId, testRegion, testNetworkId)
85-
request = request.PartialUpdateNetworkPayload(fixturePayload())
86-
for _, mod := range mods {
87-
mod(&request)
88-
}
85+
payload := fixturePayload(mods...)
86+
request = request.PartialUpdateNetworkPayload(payload)
8987
return request
9088
}
9189

@@ -319,6 +317,28 @@ func TestBuildRequest(t *testing.T) {
319317
model: fixtureInputModel(),
320318
expectedRequest: fixtureRequest(),
321319
},
320+
{
321+
description: "not setting IPv4DnsNameServers does not result in nil pointer dereference",
322+
model: fixtureInputModel(func(model *inputModel) {
323+
model.IPv4DnsNameServers = nil
324+
model.IPv4Gateway = new("1.1.1.1")
325+
}),
326+
expectedRequest: fixtureRequest(func(payload *iaas.PartialUpdateNetworkPayload) {
327+
payload.Ipv4.Nameservers = nil
328+
payload.Ipv4.Gateway = *iaas.NewNullableString(new("1.1.1.1"))
329+
}),
330+
},
331+
{
332+
description: "not setting IPv6DnsNameServers does not result in nil pointer dereference",
333+
model: fixtureInputModel(func(model *inputModel) {
334+
model.IPv6DnsNameServers = nil
335+
model.IPv6Gateway = new("1.1.1.1")
336+
}),
337+
expectedRequest: fixtureRequest(func(payload *iaas.PartialUpdateNetworkPayload) {
338+
payload.Ipv6.Nameservers = nil
339+
payload.Ipv6.Gateway = *iaas.NewNullableString(new("1.1.1.1"))
340+
}),
341+
},
322342
}
323343

324344
for _, tt := range tests {

0 commit comments

Comments
 (0)