Skip to content

Sync Dev from Master #1982

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 4 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net6/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WORKDIR /dotnet
RUN yum install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net6/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ WORKDIR /dotnet
RUN yum install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /dotnet
RUN dnf install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /dotnet
RUN dnf install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /dotnet
RUN dnf install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /dotnet
RUN dnf install tar gzip --assumeyes

# Install the ASP.NET Core shared framework
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
&& aspnetcore_sha512=$ASPNET_SHA512 \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -ozxf aspnetcore.tar.gz -C /dotnet \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<PropertyGroup Condition=" '$(ExecutableOutputType)'=='true' ">
<OutputType>Exe</OutputType>
<DefineConstants>$(DefineConstants);ExecutableOutputType</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' or '$(TargetFramework)' == 'net9.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ namespace Amazon.Lambda.RuntimeSupport.Bootstrap
/// <summary>
/// Builds user delegate from the handler information.
/// </summary>
#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("InvokeDelegateBuilder does not support trimming and is meant to be used in class library based Lambda functions.")]
#endif
internal class InvokeDelegateBuilder
{
private readonly InternalLogger _logger;
Expand Down
5 changes: 4 additions & 1 deletion Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
Expand All @@ -23,6 +23,8 @@ namespace Amazon.Lambda.RuntimeSupport
{
class Program
{

#if ExecutableOutputType
#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode(
"The Main entry point is used in the managed runtime which loads Lambda functions as a class library. " +
Expand All @@ -42,6 +44,7 @@ private static async Task Main(string[] args)
RuntimeSupportInitializer runtimeSupportInitializer = new RuntimeSupportInitializer(handler);
await runtimeSupportInitializer.RunLambdaBootstrap();
}
#endif

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("This code is only exercised in the class library programming model. Native AOT will not use this code path.")]
Expand Down
42 changes: 6 additions & 36 deletions Tools/LambdaTestTool-v2/Amazon.Lambda.TestTool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool", "s
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.Tests.Common", "tests\Amazon.Lambda.TestTool.Tests.Common\Amazon.Lambda.TestTool.Tests.Common.csproj", "{E4D6D10C-C65F-E5E7-F865-FA931477FBCC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.UnitTests", "tests\Amazon.Lambda.TestTool.UnitTests\Amazon.Lambda.TestTool.UnitTests.csproj", "{80A4F809-28B7-61EC-6539-DF3C7A0733FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.IntegrationTests", "tests\Amazon.Lambda.TestTool.IntegrationTests\Amazon.Lambda.TestTool.IntegrationTests.csproj", "{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaTestFunctionV2", "testapps\LambdaTestFunctionV2\LambdaTestFunctionV2.csproj", "{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaBinaryFunction", "testapps\LambdaBinaryFunction\LambdaBinaryFunction.csproj", "{F625BA55-B999-6F5D-4DA1-9D4C77996D6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaReturnStringFunction", "testapps\LambdaReturnStringFunction\LambdaReturnStringFunction.csproj", "{54F64435-2082-3F4E-D3A8-B90BE58EF2EB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaTestFunctionV1", "testapps\LambdaTestFunctionV1\LambdaTestFunctionV1.csproj", "{B532EEC5-2AA9-88BA-8D0B-46ECC392791A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.Tests.Common", "tests\Amazon.Lambda.TestTool.Tests.Common\Amazon.Lambda.TestTool.Tests.Common.csproj", "{E4D6D10C-C65F-E5E7-F865-FA931477FBCC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testapps", "testapps", "{4553EF99-1D3C-14C7-0D22-5364D18C373B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.Lambda.TestTool.UnitTests", "tests\Amazon.Lambda.TestTool.UnitTests\Amazon.Lambda.TestTool.UnitTests.csproj", "{80A4F809-28B7-61EC-6539-DF3C7A0733FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -32,6 +22,10 @@ Global
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B}.Release|Any CPU.Build.0 = Release|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Release|Any CPU.Build.0 = Release|Any CPU
{E4D6D10C-C65F-E5E7-F865-FA931477FBCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4D6D10C-C65F-E5E7-F865-FA931477FBCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4D6D10C-C65F-E5E7-F865-FA931477FBCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -40,33 +34,9 @@ Global
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80A4F809-28B7-61EC-6539-DF3C7A0733FD}.Release|Any CPU.Build.0 = Release|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216}.Release|Any CPU.Build.0 = Release|Any CPU
{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD}.Release|Any CPU.Build.0 = Release|Any CPU
{F625BA55-B999-6F5D-4DA1-9D4C77996D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F625BA55-B999-6F5D-4DA1-9D4C77996D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F625BA55-B999-6F5D-4DA1-9D4C77996D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F625BA55-B999-6F5D-4DA1-9D4C77996D6A}.Release|Any CPU.Build.0 = Release|Any CPU
{54F64435-2082-3F4E-D3A8-B90BE58EF2EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54F64435-2082-3F4E-D3A8-B90BE58EF2EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54F64435-2082-3F4E-D3A8-B90BE58EF2EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54F64435-2082-3F4E-D3A8-B90BE58EF2EB}.Release|Any CPU.Build.0 = Release|Any CPU
{B532EEC5-2AA9-88BA-8D0B-46ECC392791A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B532EEC5-2AA9-88BA-8D0B-46ECC392791A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B532EEC5-2AA9-88BA-8D0B-46ECC392791A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B532EEC5-2AA9-88BA-8D0B-46ECC392791A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{97EE2E8A-D1F4-CB11-B664-B99B036E9F7B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{F625BA55-B999-6F5D-4DA1-9D4C77996D6A} = {4553EF99-1D3C-14C7-0D22-5364D18C373B}
{54F64435-2082-3F4E-D3A8-B90BE58EF2EB} = {4553EF99-1D3C-14C7-0D22-5364D18C373B}
{B532EEC5-2AA9-88BA-8D0B-46ECC392791A} = {4553EF99-1D3C-14C7-0D22-5364D18C373B}
{803C76E6-8804-A4DF-8896-DDBC9FBEE8DD} = {4553EF99-1D3C-14C7-0D22-5364D18C373B}
{F7B6DF0E-EEB2-4B3F-47B7-49B188A2A216} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{E4D6D10C-C65F-E5E7-F865-FA931477FBCC} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{80A4F809-28B7-61EC-6539-DF3C7A0733FD} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
Expand Down
6 changes: 0 additions & 6 deletions Tools/LambdaTestTool-v2/Amazon.Lambda.TestTool.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
<Folder Name="/src/">
<Project Path="src\Amazon.Lambda.TestTool\Amazon.Lambda.TestTool.csproj" />
</Folder>
<Folder Name="/testapps/">
<Project Path="testapps\LambdaBinaryFunction\LambdaBinaryFunction.csproj" />
<Project Path="testapps\LambdaReturnStringFunction\LambdaReturnStringFunction.csproj" />
<Project Path="testapps\LambdaTestFunctionV1\LambdaTestFunctionV1.csproj" />
<Project Path="testapps\LambdaTestFunctionV2\LambdaTestFunctionV2.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests\Amazon.Lambda.TestTool.IntegrationTests\Amazon.Lambda.TestTool.IntegrationTests.csproj" />
<Project Path="tests\Amazon.Lambda.TestTool.Tests.Common\Amazon.Lambda.TestTool.Tests.Common.csproj" Type="Classic C#" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<Description>A tool to help debug and test your .NET AWS Lambda functions locally.</Description>
Expand Down Expand Up @@ -34,17 +34,18 @@
<Exec Command="dotnet msbuild ../../../../Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj --getProperty:TargetFrameworks" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="RuntimeSupportTargetFrameworks" />
</Exec>
</Target>

<Target Name="CopyRuntimeSupportFiles" DependsOnTargets="GetRuntimeSupportTargetFrameworks" BeforeTargets="_GetPackageFiles">

<ItemGroup>
<TempFrameworks Include="$(RuntimeSupportTargetFrameworks.Split(';'))" />

<TargetFrameworks Include="@(TempFrameworks)" Condition="'%(Identity)' != 'netstandard2.0'" />
</ItemGroup>
</Target>

<Target Name="PublishRuntimeSupportFiles" DependsOnTargets="GetRuntimeSupportTargetFrameworks" BeforeTargets="Build">
<Exec Command="dotnet publish &quot;$(MSBuildThisFileDirectory)../../../../Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj&quot; -c $(Configuration) -f %(TargetFrameworks.Identity) /p:ExecutableOutputType=true" />
</Target>

<Target Name="CopyRuntimeSupportFiles" DependsOnTargets="GetRuntimeSupportTargetFrameworks" BeforeTargets="_GetPackageFiles">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)../../../../Libraries/src/Amazon.Lambda.RuntimeSupport/bin/$(Configuration)/%(TargetFrameworks.Identity)/publish/**/*.*">
<Pack>true</Pack>
Expand Down
29 changes: 0 additions & 29 deletions Tools/LambdaTestTool-v2/testapps/LambdaBinaryFunction/Function.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions Tools/LambdaTestTool-v2/testapps/LambdaTestFunctionV1/Function.cs

This file was deleted.

Loading
Loading