From 0169af43c264aa68716424a82a5f8725460a5893 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Wed, 6 Mar 2024 13:28:17 +0100 Subject: [PATCH] chore: Deprecate Python39 environment (#1983) --- cmd/kyma/init/function/function.go | 3 ++- cmd/kyma/init/function/function_test.go | 4 ++-- docs/gen-docs/kyma_init_function.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/kyma/init/function/function.go b/cmd/kyma/init/function/function.go index 43385de0e..939ec6efb 100644 --- a/cmd/kyma/init/function/function.go +++ b/cmd/kyma/init/function/function.go @@ -24,6 +24,7 @@ const ( var ( deprecatedRuntimes = map[string]struct{}{ "nodejs16": {}, + "python39": {}, } ) @@ -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.`) diff --git a/cmd/kyma/init/function/function_test.go b/cmd/kyma/init/function/function_test.go index ce9676aae..2f4250c1d 100644 --- a/cmd/kyma/init/function/function_test.go +++ b/cmd/kyma/init/function/function_test.go @@ -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", @@ -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.") diff --git a/docs/gen-docs/kyma_init_function.md b/docs/gen-docs/kyma_init_function.md index 8878127ec..28794c023 100644 --- a/docs/gen-docs/kyma_init_function.md +++ b/docs/gen-docs/kyma_init_function.md @@ -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")