Skip to content

Commit 25789cc

Browse files
authored
Merge pull request #2131 from aws/dev
Sync dev and master
2 parents 63a157d + 2bc7c42 commit 25789cc

23 files changed

+220
-102
lines changed

LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=10.0.0-preview.7.25380.108
4-
ARG ASPNET_SHA512=f689f386f7fa56b9b53bd7d510abecf2b9c22358fb29367846c23fbba7b0a61a47d86dbceef96b73a728af076e55c346838497402e0cd80b8695d9dc1ea3c2b9
3+
ARG ASPNET_VERSION=10.0.0-rc.1.25451.107
4+
ARG ASPNET_SHA512=d2219850cab73cebe3625a3e5321c67e2921d3bfefb6c238044a21d8a95ca07ca731507ba7c027a8b03fe8eeba7f23d8d884d34f02437d6a5830423484053d70
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet10
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=10.0.0-preview.7.25380.108
4-
ARG ASPNET_SHA512=81358ed46adffd1a4e2e095e3d23d67d1d289a6c4c50ab20e1e71161b2823c8c44dd5a6c241ac9b3fcd4a2af518dbffbccdb7b3acd07a42af9ff24c5fd62c6a3
3+
ARG ASPNET_VERSION=10.0.0-rc.1.25451.107
4+
ARG ASPNET_SHA512=bd86bac48405084fecb610260e60a1f645de455dfaf208caec9771af160fd1d7bdc99a4a1f88169c1cef7595536d55dc571472ca7a15928271d40ae45fdedefa
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet10
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=8.0.19
4-
ARG ASPNET_SHA512=9503fe84627716cb9df02c648e34971c6ec4d44686f213bc6f6bd74bc54ffb41ef272fbd2c8aa3f0a309b20664796c12f9c77b137015f84581ac265af2f21687
3+
ARG ASPNET_VERSION=8.0.20
4+
ARG ASPNET_SHA512=228713f3c3600c49e7924e26dc86115c9674b5308b44514a53f670fa785038aa885ead8cd2c1c1850d1565b689a95a92e97f472d86429930dbfb114aa6020eb7
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet8
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=8.0.19
4-
ARG ASPNET_SHA512=cc14503e5c1d94a333fd8048f628760f6df2b2acd4e0d5ef465cbbfcc13517753d6fd5b1d5fe4b38b07704418a713e1338005453a7cbb8fb3f300760d00fc6e6
3+
ARG ASPNET_VERSION=8.0.20
4+
ARG ASPNET_SHA512=17b01d6309899eea40200fc449cb606df5541c5802b973c21e71d7f5539b72cb35e2daf38bd9e17ec6dccfb23c3c17afdb1e7f05fb13f10701561d2e00b19645
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet8
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=9.0.8
4-
ARG ASPNET_SHA512=08afdf924d00f875b44cc4eff68b55fb9b63e4cc68e6b5cde873da2bce9c5b5f4120e869b6a1dfdea4ab104ab0ac8783ef1577b4d3275aae899a53cd88130f1d
3+
ARG ASPNET_VERSION=9.0.9
4+
ARG ASPNET_SHA512=7ff1b517c45b2c7720fc1be808842c5b7f644ff9138f221862620e23660db528b5961f791434aa75885c808ecb3bf9d213a33e8ff3eaa477df7d6256d215a6c4
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet9
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22

3-
ARG ASPNET_VERSION=9.0.8
4-
ARG ASPNET_SHA512=cf1e72f4b327b93c1ac3f2def9ca83bee27a408e5b5913f84ed954cfd6c4639da1664fe3f4e3925883db77ed29fa5364b9ca8af3796f33ca73a4cb7484e326bc
3+
ARG ASPNET_VERSION=9.0.9
4+
ARG ASPNET_SHA512=cd2d24e16edfdbd34287a4ae25e0a517aaf1bbfa0ffd4d3bc7eac63d85dd544d43b12d081aa2419af13ac27fdb524f918ecf2fdfa916039aed66d502318a72ee
55

66
ARG LAMBDA_RUNTIME_NAME=dotnet9
77
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023

LambdaRuntimeDockerfiles/update-dockerfile.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Update-Dockerfile ([string]$DockerfilePath, [string]$NextVersion) {
1212

1313
$checksumUri = "https://dotnetcli.blob.core.windows.net/dotnet/checksums/${NextVersion}-sha.txt"
1414

15-
if ($NextVersion -match "^(\d+\.\d+\.\d+-preview\.\d+)") {
15+
if ($NextVersion -match "^(\d+\.\d+\.\d+-preview\.\d+)" -or $NextVersion -match "^(\d+\.\d+\.\d+-rc\.\d+)" ) {
1616
$matchedVersion = $matches[1]
1717
$checksumUri = "https://dotnetcli.blob.core.windows.net/dotnet/checksums/${matchedVersion}-sha.txt"
1818
}

Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<Import Project="..\..\..\buildtools\common.props" />
44

@@ -13,7 +13,9 @@
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
1515
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
16-
<LangVersion>9.0</LangVersion>
16+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
17+
<NoWarn>NU5048;NU1903;NU1902</NoWarn>
18+
<LangVersion>9.0</LangVersion>
1719
</PropertyGroup>
1820

1921
<PropertyGroup Condition=" '$(ExecutableOutputType)'=='true' ">
@@ -22,7 +24,6 @@
2224
</PropertyGroup>
2325

2426
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' or '$(TargetFramework)' == 'net9.0' or '$(TargetFramework)' == 'net10.0'">
25-
<WarningsAsErrors>IL2026,IL2067,IL2075</WarningsAsErrors>
2627
<IsTrimmable>true</IsTrimmable>
2728
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
2829
</PropertyGroup>

Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/HandlerWrapper.cs

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -29,8 +29,11 @@ public class HandlerWrapper : IDisposable
2929
private static readonly InvocationResponse EmptyInvocationResponse =
3030
new InvocationResponse(new MemoryStream(0), false);
3131

32-
private MemoryStream OutputStream = new MemoryStream();
32+
private readonly MemoryStream OutputStream = new MemoryStream();
3333

34+
/// <summary>
35+
/// The handler that will be called for each event.
36+
/// </summary>
3437
public LambdaBootstrapHandler Handler { get; private set; }
3538

3639
private HandlerWrapper(LambdaBootstrapHandler handler)
@@ -163,7 +166,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, ILambdaConte
163166
/// <summary>
164167
/// Get a HandlerWrapper that will call the given method on function invocation.
165168
/// Note that you may have to cast your handler to its specific type to help the compiler.
166-
/// Example handler signature: Task&ltStream&gt Handler()
169+
/// Example handler signature: Task&lt;Stream&gt; Handler()
167170
/// </summary>
168171
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
169172
/// <returns>A HandlerWrapper</returns>
@@ -178,7 +181,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Task<Stream>> handler)
178181
/// <summary>
179182
/// Get a HandlerWrapper that will call the given method on function invocation.
180183
/// Note that you may have to cast your handler to its specific type to help the compiler.
181-
/// Example handler signature: Task&ltStream&gt Handler(Stream)
184+
/// Example handler signature: Task&lt;Stream&gt; Handler(Stream)
182185
/// </summary>
183186
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
184187
/// <returns>A HandlerWrapper</returns>
@@ -193,7 +196,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Stream, Task<Stream>> handle
193196
/// <summary>
194197
/// Get a HandlerWrapper that will call the given method on function invocation.
195198
/// Note that you may have to cast your handler to its specific type to help the compiler.
196-
/// Example handler signature: Task&ltStream&gt Handler(PocoIn)
199+
/// Example handler signature: Task&lt;Stream&gt; Handler(PocoIn)
197200
/// </summary>
198201
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
199202
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -210,7 +213,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, Task<Stream>
210213
/// <summary>
211214
/// Get a HandlerWrapper that will call the given method on function invocation.
212215
/// Note that you may have to cast your handler to its specific type to help the compiler.
213-
/// Example handler signature: Task&ltStream&gt Handler(ILambdaContext)
216+
/// Example handler signature: Task&lt;Stream&gt; Handler(ILambdaContext)
214217
/// </summary>
215218
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
216219
/// <returns>A HandlerWrapper</returns>
@@ -225,7 +228,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<ILambdaContext, Task<Stream>
225228
/// <summary>
226229
/// Get a HandlerWrapper that will call the given method on function invocation.
227230
/// Note that you may have to cast your handler to its specific type to help the compiler.
228-
/// Example handler signature: Task&ltStream&gt Handler(Stream, ILambdaContext)
231+
/// Example handler signature: Task&lt;Stream&gt; Handler(Stream, ILambdaContext)
229232
/// </summary>
230233
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
231234
/// <returns>A HandlerWrapper</returns>
@@ -240,7 +243,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Stream, ILambdaContext, Task
240243
/// <summary>
241244
/// Get a HandlerWrapper that will call the given method on function invocation.
242245
/// Note that you may have to cast your handler to its specific type to help the compiler.
243-
/// Example handler signature: Task&ltStream&gt Handler(PocoIn, ILambdaContext)
246+
/// Example handler signature: Task&lt;Stream&gt; Handler(PocoIn, ILambdaContext)
244247
/// </summary>
245248
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
246249
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -257,7 +260,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, ILambdaConte
257260
/// <summary>
258261
/// Get a HandlerWrapper that will call the given method on function invocation.
259262
/// Note that you may have to cast your handler to its specific type to help the compiler.
260-
/// Example handler signature: Task&ltPocoOut&gt Handler()
263+
/// Example handler signature: Task&lt;PocoOut&gt; Handler()
261264
/// </summary>
262265
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
263266
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -279,7 +282,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Task<TOutput>> hand
279282
/// <summary>
280283
/// Get a HandlerWrapper that will call the given method on function invocation.
281284
/// Note that you may have to cast your handler to its specific type to help the compiler.
282-
/// Example handler signature: Task&ltPocoOut&gt Handler(Stream)
285+
/// Example handler signature: Task&lt;PocoOut&gt; Handler(Stream)
283286
/// </summary>
284287
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
285288
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -301,7 +304,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Stream, Task<TOutpu
301304
/// <summary>
302305
/// Get a HandlerWrapper that will call the given method on function invocation.
303306
/// Note that you may have to cast your handler to its specific type to help the compiler.
304-
/// Example handler signature: Task&ltPocoOut&gt Handler(PocoIn)
307+
/// Example handler signature: Task&lt;PocoOut&gt; Handler(PocoIn)
305308
/// </summary>
306309
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
307310
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -324,7 +327,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput, TOutput>(Func<TInput, Tas
324327
/// <summary>
325328
/// Get a HandlerWrapper that will call the given method on function invocation.
326329
/// Note that you may have to cast your handler to its specific type to help the compiler.
327-
/// Example handler signature: Task&ltPocoOut&gt Handler(ILambdaContext)
330+
/// Example handler signature: Task&lt;PocoOut&gt; Handler(ILambdaContext)
328331
/// </summary>
329332
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
330333
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -346,7 +349,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<ILambdaContext, Tas
346349
/// <summary>
347350
/// Get a HandlerWrapper that will call the given method on function invocation.
348351
/// Note that you may have to cast your handler to its specific type to help the compiler.
349-
/// Example handler signature: Task&ltPocoOut&gt Handler(Stream, ILambdaContext)
352+
/// Example handler signature: Task&lt;PocoOut&gt; Handler(Stream, ILambdaContext)
350353
/// </summary>
351354
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
352355
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -368,7 +371,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Stream, ILambdaCont
368371
/// <summary>
369372
/// Get a HandlerWrapper that will call the given method on function invocation.
370373
/// Note that you may have to cast your handler to its specific type to help the compiler.
371-
/// Example handler signature: Task&ltPocoOut&gt Handler(PocoIn, ILambdaContext)
374+
/// Example handler signature: Task&lt;PocoOut&gt; Handler(PocoIn, ILambdaContext)
372375
/// </summary>
373376
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
374377
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
@@ -719,6 +722,9 @@ public static HandlerWrapper GetHandlerWrapper<TInput, TOutput>(Func<TInput, ILa
719722
#region IDisposable Support
720723
private bool disposedValue = false; // To detect redundant calls
721724

725+
/// <summary>
726+
/// Dispose the HandlerWrapper
727+
/// </summary>
722728
protected virtual void Dispose(bool disposing)
723729
{
724730
if (!disposedValue)
@@ -732,6 +738,9 @@ protected virtual void Dispose(bool disposing)
732738
}
733739
}
734740

741+
/// <summary>
742+
/// Dispose the HandlerWrapper
743+
/// </summary>
735744
public void Dispose()
736745
{
737746
Dispose(true);

0 commit comments

Comments
 (0)