Skip to content

Commit

Permalink
chore: Deprecate Python39 environment (#1983)
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 authored Mar 6, 2024
1 parent 4cbab7f commit 0169af4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/kyma/init/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const (
var (
deprecatedRuntimes = map[string]struct{}{
"nodejs16": {},
"python39": {},
}
)

Expand Down Expand Up @@ -57,7 +58,7 @@ Use the flags to specify the initial configuration for your Function or to choos
`Flag used to define the environment for running your Function. Use one of these options:
- nodejs16 (deprecated)
- nodejs18
- python39
- python39 (deprecated)
- python312`,
)
cmd.Flags().StringVar(&o.SchemaVersion, "schema-version", string(workspace.SchemaVersionDefault), `Version of the config API.`)
Expand Down
4 changes: 2 additions & 2 deletions cmd/kyma/init/function/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestFunctionFlags(t *testing.T) {
"--name", "test-name",
"--namespace", "test-namespace",
"--runtime-image-override", "runtime-image-override",
"--runtime", "python39",
"--runtime", "python312",
"--url", "test-url",
"--repository-name", "test-repository-name",
"--reference", "test-reference",
Expand All @@ -42,7 +42,7 @@ func TestFunctionFlags(t *testing.T) {
require.Equal(t, "/fakepath", o.Dir, "The parsed value for the --dir flag not as expected.")
require.Equal(t, "test-name", o.Name, "The parsed value for the --name flag not as expected.")
require.Equal(t, "test-namespace", o.Namespace, "The parsed value for the --namespace flag not as expected.")
require.Equal(t, "python39", o.Runtime, "The parsed value for the --runtime flag not as expected.")
require.Equal(t, "python312", o.Runtime, "The parsed value for the --runtime flag not as expected.")
require.Equal(t, "runtime-image-override", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.")
require.Equal(t, "test-url", o.URL, "The parsed value for the --url flag not as expected.")
require.Equal(t, "test-repository-name", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.")
Expand Down
2 changes: 1 addition & 1 deletion docs/gen-docs/kyma_init_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kyma init function [flags]
-r, --runtime string Flag used to define the environment for running your Function. Use one of these options:
- nodejs16 (deprecated)
- nodejs18
- python39
- python39 (deprecated)
- python312 (default "nodejs18")
--runtime-image-override string Set custom runtime image base.
--schema-version string Version of the config API. (default "v0")
Expand Down

0 comments on commit 0169af4

Please sign in to comment.