Skip to content

Commit f903fad

Browse files
committed
feat: update generated APIs
1 parent 25445d8 commit f903fad

7 files changed

Lines changed: 34 additions & 10 deletions

File tree

cmd/scw/testdata/test-all-usage-container-container-create-usage.golden

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
33
Create a new container in the specified region.
44

5+
When creating a container, the `created` status is no longer used. The deployment process is started
6+
and the status is set to `pending` accordingly.
7+
58
USAGE:
69
scw container container create [arg=value ...]
710

cmd/scw/testdata/test-all-usage-container-container-deploy-usage.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
33
Deploy a container associated with the specified ID.
44

5+
Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous.
6+
7+
Moreover, calling `DeployContainer` immediately after `UpdateContainer` can cause `409 - resource is in a transient state` errors, so it is better to not use it when updating a container.
8+
59
USAGE:
610
scw container container deploy <container-id ...> [arg=value ...]
711

cmd/scw/testdata/test-all-usage-container-container-update-usage.golden

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Update the container associated with the specified ID.
44

55
When updating a container, the container is automatically redeployed to apply the changes.
6-
This behavior can be changed by setting the `redeploy` field to `false` in the request.
6+
7+
Warning: The `redeploy` field has been deprecated. An update now always redeploys the container.
78

89
USAGE:
910
scw container container update <container-id ...> [arg=value ...]

docs/commands/container.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Container management commands.
4949

5050
Create a new container in the specified region.
5151

52+
When creating a container, the `created` status is no longer used. The deployment process is started
53+
and the status is set to `pending` accordingly.
54+
5255
**Usage:**
5356

5457
```
@@ -118,6 +121,10 @@ scw container container delete <container-id ...> [arg=value ...]
118121

119122
Deploy a container associated with the specified ID.
120123

124+
Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous.
125+
126+
Moreover, calling `DeployContainer` immediately after `UpdateContainer` can cause `409 - resource is in a transient state` errors, so it is better to not use it when updating a container.
127+
121128
**Usage:**
122129

123130
```
@@ -183,7 +190,8 @@ scw container container list [arg=value ...]
183190
Update the container associated with the specified ID.
184191

185192
When updating a container, the container is automatically redeployed to apply the changes.
186-
This behavior can be changed by setting the `redeploy` field to `false` in the request.
193+
194+
Warning: The `redeploy` field has been deprecated. An update now always redeploys the container.
187195

188196
**Usage:**
189197

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/moby/buildkit v0.29.0
2626
github.com/moby/go-archive v0.2.0
2727
github.com/opencontainers/go-digest v1.0.0
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a
28+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721
2929
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3030
github.com/spf13/cobra v1.10.2
3131
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
476476
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
477477
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
478478
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
479-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a h1:QgieCW5f7sJFVpjSo3yvEUIh+kF7wHyDrtkoONBttKA=
480-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a/go.mod h1:jG9ApeokegM68b/6vebk8fAhBJbqZKUoor/+f19+bH0=
479+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721 h1:cysx/Agxy/gRF3WLMPh/0hcSj8QBRDEyQI/nG3a2j8Y=
480+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721/go.mod h1:jG9ApeokegM68b/6vebk8fAhBJbqZKUoor/+f19+bH0=
481481
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
482482
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
483483
github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14=

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,11 @@ func containerContainerGet() *core.Command {
516516

517517
func containerContainerCreate() *core.Command {
518518
return &core.Command{
519-
Short: `Create a new container`,
520-
Long: `Create a new container in the specified region.`,
519+
Short: `Create a new container`,
520+
Long: `Create a new container in the specified region.
521+
522+
When creating a container, the ` + "`" + `created` + "`" + ` status is no longer used. The deployment process is started
523+
and the status is set to ` + "`" + `pending` + "`" + ` accordingly.`,
521524
Namespace: "container",
522525
Resource: "container",
523526
Verb: "create",
@@ -766,7 +769,8 @@ func containerContainerUpdate() *core.Command {
766769
Long: `Update the container associated with the specified ID.
767770
768771
When updating a container, the container is automatically redeployed to apply the changes.
769-
This behavior can be changed by setting the ` + "`" + `redeploy` + "`" + ` field to ` + "`" + `false` + "`" + ` in the request.`,
772+
773+
Warning: The ` + "`" + `redeploy` + "`" + ` field has been deprecated. An update now always redeploys the container.`,
770774
Namespace: "container",
771775
Resource: "container",
772776
Verb: "update",
@@ -1044,8 +1048,12 @@ func containerContainerDelete() *core.Command {
10441048

10451049
func containerContainerDeploy() *core.Command {
10461050
return &core.Command{
1047-
Short: `Deploy a container`,
1048-
Long: `Deploy a container associated with the specified ID.`,
1051+
Short: `Deploy a container`,
1052+
Long: `Deploy a container associated with the specified ID.
1053+
1054+
Since updating a container now always deploys it (and passes its status to ` + "`" + `pending` + "`" + `), this call becomes superfluous.
1055+
1056+
Moreover, calling ` + "`" + `DeployContainer` + "`" + ` immediately after ` + "`" + `UpdateContainer` + "`" + ` can cause ` + "`" + `409 - resource is in a transient state` + "`" + ` errors, so it is better to not use it when updating a container.`,
10491057
Namespace: "container",
10501058
Resource: "container",
10511059
Verb: "deploy",

0 commit comments

Comments
 (0)