From 3cec1750d013efc5831bba201fdc4d9383d18f64 Mon Sep 17 00:00:00 2001 From: Beau Gosse Date: Mon, 11 Dec 2023 06:34:10 +0000 Subject: [PATCH 1/3] feat: add dotnet8 support --- .gitignore | 2 + samcli/commands/build/command.py | 2 +- samcli/lib/build/workflow_config.py | 2 + samcli/lib/utils/architecture.py | 1 + samcli/lib/utils/preview_runtimes.py | 2 +- samcli/local/common/runtime_template.py | 6 ++- samcli/local/docker/lambda_debug_settings.py | 4 ++ samcli/local/docker/lambda_image.py | 1 + schema/samcli.json | 8 ++-- tests/integration/buildcmd/test_build_cmd.py | 8 +++- .../buildcmd/Dotnet8/HelloWorld.csproj | 16 +++++++ .../testdata/buildcmd/Dotnet8/Program.cs | 44 +++++++++++++++++++ .../Dotnet8/aws-lambda-tools-defaults.json | 19 ++++++++ .../validate/test_validate_command.py | 1 + .../local/docker/test_lambda_container.py | 3 +- .../docker/test_lambda_debug_settings.py | 1 + tests/unit/local/docker/test_lambda_image.py | 1 + 17 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj create mode 100644 tests/integration/testdata/buildcmd/Dotnet8/Program.cs create mode 100644 tests/integration/testdata/buildcmd/Dotnet8/aws-lambda-tools-defaults.json diff --git a/.gitignore b/.gitignore index 784bc4af7c..9eba302782 100644 --- a/.gitignore +++ b/.gitignore @@ -416,6 +416,8 @@ tests/integration/testdata/buildcmd/Dotnet6/bin tests/integration/testdata/buildcmd/Dotnet6/obj tests/integration/testdata/buildcmd/Dotnet7/bin tests/integration/testdata/buildcmd/Dotnet7/obj +tests/integration/testdata/buildcmd/Dotnet8/bin +tests/integration/testdata/buildcmd/Dotnet8/obj tests/integration/testdata/invoke/credential_tests/inprocess/dotnet/STS/obj tests/integration/testdata/sync/code/after/dotnet_function/src/HelloWorld/obj/ tests/integration/testdata/sync/code/before/dotnet_function/src/HelloWorld/obj/ diff --git a/samcli/commands/build/command.py b/samcli/commands/build/command.py index 2f7cd00392..e332b9cfd9 100644 --- a/samcli/commands/build/command.py +++ b/samcli/commands/build/command.py @@ -57,7 +57,7 @@ 2. Nodejs 20.x, 18.x, 16.x, 14.x, 12.x using NPM\n 3. Ruby 2.7, 3.2 using Bundler\n 4. Java 8, Java 11, Java 17, Java 21 using Gradle and Maven\n - 5. Dotnet6 using Dotnet CLI (without --use-container)\n + 5. Dotnet8, Dotnet6 using Dotnet CLI\n 6. Go 1.x using Go Modules (without --use-container)\n """ diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py index f13d02a3e6..020a86d808 100644 --- a/samcli/lib/build/workflow_config.py +++ b/samcli/lib/build/workflow_config.py @@ -107,6 +107,7 @@ def get_layer_subfolder(build_workflow: str) -> str: "java17": "java", "java21": "java", "dotnet6": "dotnet", + "dotnet8": "dotnet", # User is responsible for creating subfolder in these workflows "makefile": "", } @@ -169,6 +170,7 @@ def get_workflow_config( "ruby2.7": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG), "ruby3.2": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG), "dotnet6": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), + "dotnet8": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), "go1.x": BasicWorkflowSelector(GO_MOD_CONFIG), # When Maven builder exists, add to this list so we can automatically choose a builder based on the supported # manifest diff --git a/samcli/lib/utils/architecture.py b/samcli/lib/utils/architecture.py index 8c394d6229..db0cc85721 100644 --- a/samcli/lib/utils/architecture.py +++ b/samcli/lib/utils/architecture.py @@ -34,6 +34,7 @@ "java21": [ARM64, X86_64], "go1.x": [X86_64], "dotnet6": [ARM64, X86_64], + "dotnet8": [ARM64, X86_64], "provided": [X86_64], "provided.al2": [ARM64, X86_64], "provided.al2023": [ARM64, X86_64], diff --git a/samcli/lib/utils/preview_runtimes.py b/samcli/lib/utils/preview_runtimes.py index 6bea7bb6de..bdc4273b2c 100644 --- a/samcli/lib/utils/preview_runtimes.py +++ b/samcli/lib/utils/preview_runtimes.py @@ -4,4 +4,4 @@ """ from typing import Set -PREVIEW_RUNTIMES: Set[str] = {"python3.12"} +PREVIEW_RUNTIMES: Set[str] = {"python3.12", "dotnet8"} diff --git a/samcli/local/common/runtime_template.py b/samcli/local/common/runtime_template.py index 94fe22d754..d7d16bcb8a 100644 --- a/samcli/local/common/runtime_template.py +++ b/samcli/local/common/runtime_template.py @@ -40,7 +40,7 @@ ], "dotnet": [ { - "runtimes": ["dotnet6"], + "runtimes": ["dotnet8", "dotnet6"], "dependency_manager": "cli-package", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-dotnet"), "build": True, @@ -99,7 +99,9 @@ def get_local_lambda_images_location(mapping, runtime): # Runtimes are ordered in alphabetical fashion with reverse version order (latest versions first) INIT_RUNTIMES = [ # dotnet runtimes in descending order + "dotnet8", "dotnet6", + # go runtimes in descending order "go1.x", # java runtimes in descending order "java21", @@ -131,6 +133,7 @@ def get_local_lambda_images_location(mapping, runtime): LAMBDA_IMAGES_RUNTIMES_MAP = { + "dotnet8": "amazon/dotnet8-base", "dotnet6": "amazon/dotnet6-base", "go1.x": "amazon/go1.x-base", "go (provided.al2)": "amazon/go-provided.al2-base", @@ -173,6 +176,7 @@ def get_local_lambda_images_location(mapping, runtime): "python3.11": "Python36", "python3.12": "Python36", "dotnet6": "dotnet6", + "dotnet8": "dotnet6", "go1.x": "Go1", } diff --git a/samcli/local/docker/lambda_debug_settings.py b/samcli/local/docker/lambda_debug_settings.py index 05956e0eac..31e180200f 100644 --- a/samcli/local/docker/lambda_debug_settings.py +++ b/samcli/local/docker/lambda_debug_settings.py @@ -107,6 +107,10 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime entry + ["/var/runtime/bootstrap"] + debug_args_list, container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars}, ), + Runtime.dotnet8.value: lambda: DebugSettings( + entry + ["/var/runtime/bootstrap"] + debug_args_list, + container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars}, + ), Runtime.go1x.value: lambda: DebugSettings( entry, container_env_vars={ diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py index c775a94f4f..ead6878ff5 100644 --- a/samcli/local/docker/lambda_image.py +++ b/samcli/local/docker/lambda_image.py @@ -52,6 +52,7 @@ class Runtime(Enum): java21 = "java21" go1x = "go1.x" dotnet6 = "dotnet6" + dotnet8 = "dotnet8" provided = "provided" providedal2 = "provided.al2" providedal2023 = "provided.al2023" diff --git a/schema/samcli.json b/schema/samcli.json index c057f3368a..e8c6da026e 100644 --- a/schema/samcli.json +++ b/schema/samcli.json @@ -23,7 +23,7 @@ "properties": { "parameters": { "title": "Parameters for the init command", - "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, nodejs14.x, nodejs12.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2, ruby2.7\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs12.x-base, amazon/nodejs14.x-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby2.7-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", + "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, nodejs14.x, nodejs12.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2, ruby2.7\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs12.x-base, amazon/nodejs14.x-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby2.7-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", "type": "object", "properties": { "no_interactive": { @@ -48,9 +48,10 @@ "runtime": { "title": "runtime", "type": "string", - "description": "Lambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, nodejs14.x, nodejs12.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2, ruby2.7", + "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, nodejs14.x, nodejs12.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2, ruby2.7", "enum": [ "dotnet6", + "dotnet8", "go1.x", "java11", "java17", @@ -87,9 +88,10 @@ "base_image": { "title": "base_image", "type": "string", - "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs12.x-base, amazon/nodejs14.x-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby2.7-base, amazon/ruby3.2-base", + "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs12.x-base, amazon/nodejs14.x-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby2.7-base, amazon/ruby3.2-base", "enum": [ "amazon/dotnet6-base", + "amazon/dotnet8-base", "amazon/go-provided.al2-base", "amazon/go-provided.al2023-base", "amazon/go1.x-base", diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py index 656f1ab515..2b15e13484 100644 --- a/tests/integration/buildcmd/test_build_cmd.py +++ b/tests/integration/buildcmd/test_build_cmd.py @@ -1197,6 +1197,8 @@ class TestBuildCommand_Dotnet_cli_package(BuildIntegBase): ("dotnet6", "Dotnet6", None), ("dotnet6", "Dotnet6", "debug"), ("provided.al2", "Dotnet7", None), + ("dotnet8", "Dotnet8", None), + ("dotnet8", "Dotnet8", "debug"), ] ) def test_dotnet_in_process(self, runtime, code_uri, mode, architecture="x86_64"): @@ -1265,6 +1267,8 @@ def test_dotnet_in_process(self, runtime, code_uri, mode, architecture="x86_64") # force to run tests on arm64 machines may cause dotnet7 test failing # because Native AOT Lambda functions require the host and lambda architectures to match ("provided.al2", "Dotnet7", None), + ("dotnet8", "Dotnet8", None), + ("dotnet8", "Dotnet8", "debug"), ] ) @skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE) @@ -1335,6 +1339,8 @@ def test_dotnet_in_container_mount_with_write_explicit(self, runtime, code_uri, # force to run tests on arm64 machines may cause dotnet7 test failing # because Native AOT Lambda functions require the host and lambda architectures to match ("provided.al2", "Dotnet7", None), + ("dotnet8", "Dotnet8", None), + ("dotnet8", "Dotnet8", "debug"), ] ) @skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE) @@ -1402,7 +1408,7 @@ def test_dotnet_in_container_mount_with_write_interactive( ) self.verify_docker_container_cleanedup(runtime) - @parameterized.expand([("dotnet6", "Dotnet6")]) + @parameterized.expand([("dotnet6", "Dotnet6"), ("dotnet8", "Dotnet8")]) @skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE) def test_must_fail_on_container_mount_without_write_interactive(self, runtime, code_uri): use_container = True diff --git a/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj b/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj new file mode 100644 index 0000000000..4d3fd318cb --- /dev/null +++ b/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj @@ -0,0 +1,16 @@ + + + + net8.0 + true + + + + + + + + + + + diff --git a/tests/integration/testdata/buildcmd/Dotnet8/Program.cs b/tests/integration/testdata/buildcmd/Dotnet8/Program.cs new file mode 100644 index 0000000000..b7dc35f8f6 --- /dev/null +++ b/tests/integration/testdata/buildcmd/Dotnet8/Program.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Net.Http; +using System.Net.Http.Headers; +using Newtonsoft.Json; + +using Amazon.Lambda.Core; +using Amazon.Lambda.APIGatewayEvents; + +// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. +[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] + +namespace HelloWorld +{ + + public class Function + { + + public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) + { + return "{'message': 'Hello World'}"; + } + } + + public class FirstFunction + { + + public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) + { + return "Hello World"; + } + } + + public class SecondFunction + { + + public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) + { + return "Hello Mars"; + } + } +} diff --git a/tests/integration/testdata/buildcmd/Dotnet8/aws-lambda-tools-defaults.json b/tests/integration/testdata/buildcmd/Dotnet8/aws-lambda-tools-defaults.json new file mode 100644 index 0000000000..d4a2ed5caf --- /dev/null +++ b/tests/integration/testdata/buildcmd/Dotnet8/aws-lambda-tools-defaults.json @@ -0,0 +1,19 @@ +{ + "Information" : [ + "This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", + "To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", + + "dotnet lambda help", + + "All the command line options for the Lambda command can be specified in this file." + ], + + "profile":"", + "region" : "", + "configuration": "Release", + "framework": "net8.0", + "function-runtime":"dotnet8", + "function-memory-size" : 256, + "function-timeout" : 30, + "function-handler" : "HelloWorld::HelloWorld.Function::FunctionHandler" +} diff --git a/tests/integration/validate/test_validate_command.py b/tests/integration/validate/test_validate_command.py index 900a3af480..3cd108572e 100644 --- a/tests/integration/validate/test_validate_command.py +++ b/tests/integration/validate/test_validate_command.py @@ -131,6 +131,7 @@ def test_lint_supported_runtimes(self): "Resources": {}, } supported_runtimes = [ + "dotnet8", "dotnet6", "go1.x", "java21", diff --git a/tests/unit/local/docker/test_lambda_container.py b/tests/unit/local/docker/test_lambda_container.py index d36aeff841..1307ca8734 100644 --- a/tests/unit/local/docker/test_lambda_container.py +++ b/tests/unit/local/docker/test_lambda_container.py @@ -12,7 +12,7 @@ from samcli.local.docker.lambda_debug_settings import DebuggingNotSupported from samcli.local.docker.lambda_image import RAPID_IMAGE_TAG_PREFIX -RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnet6.value, Runtime.go1x.value] +RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnet6.value, Runtime.dotnet8.value, Runtime.go1x.value] RUNTIMES_WITH_BOOTSTRAP_ENTRYPOINT = [ Runtime.nodejs12x.value, @@ -27,6 +27,7 @@ Runtime.python311.value, Runtime.python312.value, Runtime.dotnet6.value, + Runtime.dotnet8.value, ] RUNTIMES_WITH_DEBUG_ENV_VARS_ONLY = [ diff --git a/tests/unit/local/docker/test_lambda_debug_settings.py b/tests/unit/local/docker/test_lambda_debug_settings.py index c05b8cd04e..9ed32be0dd 100644 --- a/tests/unit/local/docker/test_lambda_debug_settings.py +++ b/tests/unit/local/docker/test_lambda_debug_settings.py @@ -12,6 +12,7 @@ Runtime.java17, Runtime.java21, Runtime.dotnet6, + Runtime.dotnet8, Runtime.go1x, Runtime.nodejs12x, Runtime.nodejs14x, diff --git a/tests/unit/local/docker/test_lambda_image.py b/tests/unit/local/docker/test_lambda_image.py index b56c13798c..e6796f6d54 100644 --- a/tests/unit/local/docker/test_lambda_image.py +++ b/tests/unit/local/docker/test_lambda_image.py @@ -34,6 +34,7 @@ class TestRuntime(TestCase): ("java21", "java:21-x86_64"), ("go1.x", "go:1"), ("dotnet6", "dotnet:6-x86_64"), + ("dotnet8", "dotnet:8-x86_64"), ("provided", "provided:alami"), ("provided.al2", "provided:al2-x86_64"), ("provided.al2023", "provided:al2023-x86_64"), From b341a09ad7627320d6be6d1173839ee5feaf3a50 Mon Sep 17 00:00:00 2001 From: Beau Gosse Date: Thu, 8 Feb 2024 05:17:21 +0000 Subject: [PATCH 2/3] Update dotnet8 test dependencies and remove extra using directives --- .../testdata/buildcmd/Dotnet8/HelloWorld.csproj | 11 +++++------ .../integration/testdata/buildcmd/Dotnet8/Program.cs | 10 +--------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj b/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj index 4d3fd318cb..1ca34ecbcc 100644 --- a/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj +++ b/tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj @@ -6,11 +6,10 @@ - - - - + + + + - - + \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/Dotnet8/Program.cs b/tests/integration/testdata/buildcmd/Dotnet8/Program.cs index b7dc35f8f6..f841dafdf1 100644 --- a/tests/integration/testdata/buildcmd/Dotnet8/Program.cs +++ b/tests/integration/testdata/buildcmd/Dotnet8/Program.cs @@ -1,11 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Net.Http; -using System.Net.Http.Headers; -using Newtonsoft.Json; - using Amazon.Lambda.Core; using Amazon.Lambda.APIGatewayEvents; @@ -41,4 +33,4 @@ public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaCont return "Hello Mars"; } } -} +} \ No newline at end of file From 8613b683a6225ad87626725f88561bc11e9d7a27 Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Fri, 16 Feb 2024 08:40:49 -0800 Subject: [PATCH 3/3] Update samcli/lib/utils/preview_runtimes.py --- samcli/lib/utils/preview_runtimes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samcli/lib/utils/preview_runtimes.py b/samcli/lib/utils/preview_runtimes.py index a81f308e1d..c17ae95cf8 100644 --- a/samcli/lib/utils/preview_runtimes.py +++ b/samcli/lib/utils/preview_runtimes.py @@ -4,4 +4,4 @@ """ from typing import Set -PREVIEW_RUNTIMES: Set[str] = {"dotnet8"} +PREVIEW_RUNTIMES: Set[str] = set()