From 0b74d8643e6413c8a7db5100b887991a574f3838 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Wed, 2 Oct 2024 08:34:12 +0200 Subject: [PATCH] feat(serverless): remove default on http-option (#4152) --- .../test-all-usage-container-container-update-usage.golden | 2 +- .../test-all-usage-function-function-update-usage.golden | 2 +- docs/commands/container.md | 2 +- docs/commands/function.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- internal/namespaces/container/v1beta1/container_cli.go | 1 - internal/namespaces/function/v1beta1/function_cli.go | 1 - 8 files changed, 7 insertions(+), 9 deletions(-) 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 e490d3f955..d58fd8efa4 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 @@ -22,7 +22,7 @@ ARGS: [port] [secret-environment-variables.{index}.key] [secret-environment-variables.{index}.value] - [http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) + [http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) [sandbox] Execution environment of the container (unknown_sandbox | v1 | v2) [local-storage-limit] Local storage limit of the container (in MB) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden b/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden index 9029058a7a..1683def780 100644 --- a/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden @@ -19,7 +19,7 @@ ARGS: [description] Description of the function [secret-environment-variables.{index}.key] [secret-environment-variables.{index}.value] - [http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) + [http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) [sandbox] Execution environment of the function (unknown_sandbox | v1 | v2) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/docs/commands/container.md b/docs/commands/container.md index f69c7f4477..193f1352e1 100644 --- a/docs/commands/container.md +++ b/docs/commands/container.md @@ -199,7 +199,7 @@ scw container container update [arg=value ...] | port | | | | secret-environment-variables.{index}.key | | | | secret-environment-variables.{index}.value | | | -| http-option | Default: `enabled`
One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | +| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | | sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the container | | local-storage-limit | | Local storage limit of the container (in MB) | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/docs/commands/function.md b/docs/commands/function.md index 180cda0729..e5242c6c5a 100644 --- a/docs/commands/function.md +++ b/docs/commands/function.md @@ -461,7 +461,7 @@ scw function function update [arg=value ...] | description | | Description of the function | | secret-environment-variables.{index}.key | | | | secret-environment-variables.{index}.value | | | -| http-option | Default: `enabled`
One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | +| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | | sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the function | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/go.mod b/go.mod index 5c9122ea18..5ec197d9e6 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/moby/buildkit v0.13.2 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240918143018-367e0bbfa46e + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241001085744-c3abf300c911 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 461d0bc9c6..5344907d6c 100644 --- a/go.sum +++ b/go.sum @@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz 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.30.0.20240918143018-367e0bbfa46e h1:pun/kzFkKXoXMCnx8O63eLDz69uk0ggjV+OAnbjpw3w= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240918143018-367e0bbfa46e/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241001085744-c3abf300c911 h1:IwmIIQaLdCx38LeWFIJqNqF8qHTCEdSecY5k5D5LI0k= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241001085744-c3abf300c911/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY= 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.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go index ff4fc4d23b..9f5e529f13 100644 --- a/internal/namespaces/container/v1beta1/container_cli.go +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -737,7 +737,6 @@ func containerContainerUpdate() *core.Command { Required: false, Deprecated: false, Positional: false, - Default: core.DefaultValueSetter("enabled"), EnumValues: []string{"unknown_http_option", "enabled", "redirected"}, }, { diff --git a/internal/namespaces/function/v1beta1/function_cli.go b/internal/namespaces/function/v1beta1/function_cli.go index e9a0e15dd3..0ffab7c504 100644 --- a/internal/namespaces/function/v1beta1/function_cli.go +++ b/internal/namespaces/function/v1beta1/function_cli.go @@ -738,7 +738,6 @@ func functionFunctionUpdate() *core.Command { Required: false, Deprecated: false, Positional: false, - Default: core.DefaultValueSetter("enabled"), EnumValues: []string{"unknown_http_option", "enabled", "redirected"}, }, {