From f903fad0091b3bf67ddb3c70eac40e02a616d4a9 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 14 Apr 2026 13:58:27 +0000 Subject: [PATCH] feat: update generated APIs --- ...age-container-container-create-usage.golden | 3 +++ ...age-container-container-deploy-usage.golden | 4 ++++ ...age-container-container-update-usage.golden | 3 ++- docs/commands/container.md | 10 +++++++++- go.mod | 2 +- go.sum | 4 ++-- .../container/v1beta1/container_cli.go | 18 +++++++++++++----- 7 files changed, 34 insertions(+), 10 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden index e63520aa6d..e69a472a8d 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden @@ -2,6 +2,9 @@ 🟥🟥🟥 STDERR️️ 🟥🟥🟥️ Create a new container in the specified region. +When creating a container, the `created` status is no longer used. The deployment process is started +and the status is set to `pending` accordingly. + USAGE: scw container container create [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-container-container-deploy-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-deploy-usage.golden index a09be53882..d1eddc5f26 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-deploy-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-deploy-usage.golden @@ -2,6 +2,10 @@ 🟥🟥🟥 STDERR️️ 🟥🟥🟥️ Deploy a container associated with the specified ID. +Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous. + +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. + USAGE: scw container container deploy [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden index 96bceaa002..15c75da6ec 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden @@ -3,7 +3,8 @@ Update the container associated with the specified ID. When updating a container, the container is automatically redeployed to apply the changes. -This behavior can be changed by setting the `redeploy` field to `false` in the request. + +Warning: The `redeploy` field has been deprecated. An update now always redeploys the container. USAGE: scw container container update [arg=value ...] diff --git a/docs/commands/container.md b/docs/commands/container.md index f578387057..a12feb36ef 100644 --- a/docs/commands/container.md +++ b/docs/commands/container.md @@ -49,6 +49,9 @@ Container management commands. Create a new container in the specified region. +When creating a container, the `created` status is no longer used. The deployment process is started +and the status is set to `pending` accordingly. + **Usage:** ``` @@ -118,6 +121,10 @@ scw container container delete [arg=value ...] Deploy a container associated with the specified ID. +Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous. + +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. + **Usage:** ``` @@ -183,7 +190,8 @@ scw container container list [arg=value ...] Update the container associated with the specified ID. When updating a container, the container is automatically redeployed to apply the changes. -This behavior can be changed by setting the `redeploy` field to `false` in the request. + +Warning: The `redeploy` field has been deprecated. An update now always redeploys the container. **Usage:** diff --git a/go.mod b/go.mod index 0e75ec9090..e8e8620915 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/moby/buildkit v0.29.0 github.com/moby/go-archive v0.2.0 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 81df50ddd3..5671dcd32c 100644 --- a/go.sum +++ b/go.sum @@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a h1:QgieCW5f7sJFVpjSo3yvEUIh+kF7wHyDrtkoONBttKA= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410075832-1d11daa52f3a/go.mod h1:jG9ApeokegM68b/6vebk8fAhBJbqZKUoor/+f19+bH0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721 h1:cysx/Agxy/gRF3WLMPh/0hcSj8QBRDEyQI/nG3a2j8Y= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260410085437-583409c79721/go.mod h1:jG9ApeokegM68b/6vebk8fAhBJbqZKUoor/+f19+bH0= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go index b572dac3f7..9877f1e48b 100644 --- a/internal/namespaces/container/v1beta1/container_cli.go +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -516,8 +516,11 @@ func containerContainerGet() *core.Command { func containerContainerCreate() *core.Command { return &core.Command{ - Short: `Create a new container`, - Long: `Create a new container in the specified region.`, + Short: `Create a new container`, + Long: `Create a new container in the specified region. + +When creating a container, the ` + "`" + `created` + "`" + ` status is no longer used. The deployment process is started +and the status is set to ` + "`" + `pending` + "`" + ` accordingly.`, Namespace: "container", Resource: "container", Verb: "create", @@ -766,7 +769,8 @@ func containerContainerUpdate() *core.Command { Long: `Update the container associated with the specified ID. When updating a container, the container is automatically redeployed to apply the changes. -This behavior can be changed by setting the ` + "`" + `redeploy` + "`" + ` field to ` + "`" + `false` + "`" + ` in the request.`, + +Warning: The ` + "`" + `redeploy` + "`" + ` field has been deprecated. An update now always redeploys the container.`, Namespace: "container", Resource: "container", Verb: "update", @@ -1044,8 +1048,12 @@ func containerContainerDelete() *core.Command { func containerContainerDeploy() *core.Command { return &core.Command{ - Short: `Deploy a container`, - Long: `Deploy a container associated with the specified ID.`, + Short: `Deploy a container`, + Long: `Deploy a container associated with the specified ID. + +Since updating a container now always deploys it (and passes its status to ` + "`" + `pending` + "`" + `), this call becomes superfluous. + +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.`, Namespace: "container", Resource: "container", Verb: "deploy",