-
Notifications
You must be signed in to change notification settings - Fork 152
feat: add dotnet10 runtime #811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,7 @@ | |
| DOTNET_RUNTIMES = [ | ||
| "dotnet6", | ||
| "dotnet8", | ||
| "dotnet10", | ||
| ] | ||
|
|
||
| # Custom runtimes | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...s/integration/workflows/dotnet_clipackage/testdata/CustomRuntime10/CustomRuntime10.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <AWSProjectType>Lambda</AWSProjectType> | ||
| <AssemblyName>bootstrap</AssemblyName> | ||
| <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
| <PublishReadyToRun>true</PublishReadyToRun> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Amazon.Lambda.RuntimeSupport" Version="1.8.2" /> | ||
| <PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" /> | ||
| <PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" /> | ||
| </ItemGroup> | ||
| </Project> |
21 changes: 21 additions & 0 deletions
21
tests/integration/workflows/dotnet_clipackage/testdata/CustomRuntime10/Function.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| using Amazon.Lambda.Core; | ||
| using Amazon.Lambda.RuntimeSupport; | ||
| using Amazon.Lambda.Serialization.SystemTextJson; | ||
|
|
||
| namespace CustomRuntime10; | ||
|
|
||
| public class Function | ||
| { | ||
| private static async Task Main(string[] args) | ||
| { | ||
| Func<string, ILambdaContext, string> handler = FunctionHandler; | ||
| await LambdaBootstrapBuilder.Create(handler, new DefaultLambdaJsonSerializer()) | ||
| .Build() | ||
| .RunAsync(); | ||
| } | ||
|
|
||
| public static string FunctionHandler(string input, ILambdaContext context) | ||
| { | ||
| return input.ToUpper(); | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...ation/workflows/dotnet_clipackage/testdata/CustomRuntime10/aws-lambda-tools-defaults.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "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", | ||
| "function-runtime": "provided.al2023", | ||
| "function-memory-size": 256, | ||
| "function-timeout": 30, | ||
| "function-handler": "bootstrap", | ||
| "msbuild-parameters": "--self-contained true" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/integration/workflows/dotnet_clipackage/testdata/WithDefaultsFile10/Function.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Threading.Tasks; | ||
|
|
||
| using Amazon.Lambda.Core; | ||
|
|
||
| // 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 WithDefaultsFile | ||
| { | ||
| public class Function | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// A simple function that takes a string and does a ToUpper | ||
| /// </summary> | ||
| /// <param name="input"></param> | ||
| /// <param name="context"></param> | ||
| /// <returns></returns> | ||
| public string FunctionHandler(string input, ILambdaContext context) | ||
| { | ||
| return input?.ToUpper(); | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
...tegration/workflows/dotnet_clipackage/testdata/WithDefaultsFile10/WithDefaultsFile.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
| <AWSProjectType>Lambda</AWSProjectType> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" /> | ||
| <PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.4.0" /> | ||
| </ItemGroup> | ||
| </Project> |
16 changes: 16 additions & 0 deletions
16
...on/workflows/dotnet_clipackage/testdata/WithDefaultsFile10/aws-lambda-tools-defaults.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "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": "net10.0", | ||
| "function-runtime": "dotnet10", | ||
| "function-memory-size": 256, | ||
| "function-timeout": 30, | ||
| "function-handler": "WithDefaultsFile::WithDefaultsFile.Function::FunctionHandler" | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious: what dotnet version did we test before this?