Skip to content

Commit 26c7db8

Browse files
scaleway-botjremy42remyleone
authored
feat(functions): add new runtimes (#4604)
Co-authored-by: Jonathan R. <[email protected]> Co-authored-by: Rémy Léone <[email protected]>
1 parent b090264 commit 26c7db8

7 files changed

+11
-11
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88
ARGS:
99
[namespace-id] Function Namespace ID to deploy to
1010
name Name of the function to deploy, will be used in namespace's name if no ID is provided
11-
runtime (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124)
11+
runtime (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124 | python313 | rust185 | php84)
1212
zip-file Path of the zip file that contains your code
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1414

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARGS:
1111
[environment-variables.{key}] Environment variables of the function
1212
[min-scale] Minumum number of instances to scale the function to
1313
[max-scale] Maximum number of instances to scale the function to
14-
[runtime] Runtime to use with the function (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124)
14+
[runtime] Runtime to use with the function (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124 | python313 | rust185 | php84)
1515
[memory-limit] Memory limit of the function in MB
1616
[timeout] Request processing time limit for the function
1717
[handler] Handler to use with the function

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARGS:
1010
[environment-variables.{key}] Environment variables of the function to update
1111
[min-scale] Minumum number of instances to scale the function to
1212
[max-scale] Maximum number of instances to scale the function to
13-
[runtime] Runtime to use with the function (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124)
13+
[runtime] Runtime to use with the function (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18 | rust165 | go119 | python311 | php82 | node19 | go120 | node20 | go121 | node22 | python312 | php83 | go122 | rust179 | go123 | go124 | python313 | rust185 | php84)
1414
[memory-limit] Memory limit of the function in MB
1515
[timeout] Processing time limit for the function
1616
[redeploy] Redeploy failed function

docs/commands/function.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ scw function deploy [arg=value ...]
176176
|------|---|-------------|
177177
| namespace-id | | Function Namespace ID to deploy to |
178178
| name | Required | Name of the function to deploy, will be used in namespace's name if no ID is provided |
179-
| runtime | Required<br />One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124` | |
179+
| runtime | Required<br />One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124`, `python313`, `rust185`, `php84` | |
180180
| zip-file | Required | Path of the zip file that contains your code |
181181
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
182182

@@ -294,7 +294,7 @@ scw function function create [arg=value ...]
294294
| environment-variables.{key} | | Environment variables of the function |
295295
| min-scale | | Minumum number of instances to scale the function to |
296296
| max-scale | | Maximum number of instances to scale the function to |
297-
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124` | Runtime to use with the function |
297+
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124`, `python313`, `rust185`, `php84` | Runtime to use with the function |
298298
| memory-limit | | Memory limit of the function in MB |
299299
| timeout | | Request processing time limit for the function |
300300
| handler | | Handler to use with the function |
@@ -452,7 +452,7 @@ scw function function update <function-id ...> [arg=value ...]
452452
| environment-variables.{key} | | Environment variables of the function to update |
453453
| min-scale | | Minumum number of instances to scale the function to |
454454
| max-scale | | Maximum number of instances to scale the function to |
455-
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124` | Runtime to use with the function |
455+
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18`, `rust165`, `go119`, `python311`, `php82`, `node19`, `go120`, `node20`, `go121`, `node22`, `python312`, `php83`, `go122`, `rust179`, `go123`, `go124`, `python313`, `rust185`, `php84` | Runtime to use with the function |
456456
| memory-limit | | Memory limit of the function in MB |
457457
| timeout | | Processing time limit for the function |
458458
| redeploy | | Redeploy failed function |

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/mattn/go-isatty v0.0.20
2626
github.com/moby/buildkit v0.13.2
2727
github.com/opencontainers/go-digest v1.0.0
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0
28+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320154743-e4b083248f79
2929
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3030
github.com/spf13/cobra v1.9.1
3131
github.com/spf13/pflag v1.0.6

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0 h1:aqpUaCWx5ta43b9dZv1bMIvUUJTux9Am+S7RmJbiVN8=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320154743-e4b083248f79 h1:6gWhYDQblqaIYxEYwJDkcJbvqnKmz6uHwrYcxOeMZ7s=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320154743-e4b083248f79/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/function/v1beta1/function_cli.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ func functionFunctionCreate() *core.Command {
565565
Required: false,
566566
Deprecated: false,
567567
Positional: false,
568-
EnumValues: []string{"unknown_runtime", "golang", "python", "python3", "node8", "node10", "node14", "node16", "node17", "python37", "python38", "python39", "python310", "go113", "go117", "go118", "node18", "rust165", "go119", "python311", "php82", "node19", "go120", "node20", "go121", "node22", "python312", "php83", "go122", "rust179", "go123", "go124"},
568+
EnumValues: []string{"unknown_runtime", "golang", "python", "python3", "node8", "node10", "node14", "node16", "node17", "python37", "python38", "python39", "python310", "go113", "go117", "go118", "node18", "rust165", "go119", "python311", "php82", "node19", "go120", "node20", "go121", "node22", "python312", "php83", "go122", "rust179", "go123", "go124", "python313", "rust185", "php84"},
569569
},
570570
{
571571
Name: "memory-limit",
@@ -689,7 +689,7 @@ func functionFunctionUpdate() *core.Command {
689689
Required: false,
690690
Deprecated: false,
691691
Positional: false,
692-
EnumValues: []string{"unknown_runtime", "golang", "python", "python3", "node8", "node10", "node14", "node16", "node17", "python37", "python38", "python39", "python310", "go113", "go117", "go118", "node18", "rust165", "go119", "python311", "php82", "node19", "go120", "node20", "go121", "node22", "python312", "php83", "go122", "rust179", "go123", "go124"},
692+
EnumValues: []string{"unknown_runtime", "golang", "python", "python3", "node8", "node10", "node14", "node16", "node17", "python37", "python38", "python39", "python310", "go113", "go117", "go118", "node18", "rust165", "go119", "python311", "php82", "node19", "go120", "node20", "go121", "node22", "python312", "php83", "go122", "rust179", "go123", "go124", "python313", "rust185", "php84"},
693693
},
694694
{
695695
Name: "memory-limit",

0 commit comments

Comments
 (0)