diff --git a/.autover/changes/1bf02dc5-534e-4f49-a4d9-cf07daf4fde7.json b/.autover/changes/1bf02dc5-534e-4f49-a4d9-cf07daf4fde7.json
new file mode 100644
index 000000000..3bb01ddc5
--- /dev/null
+++ b/.autover/changes/1bf02dc5-534e-4f49-a4d9-cf07daf4fde7.json
@@ -0,0 +1,11 @@
+{
+ "Projects": [
+ {
+ "Name": "Amazon.Lambda.Core",
+ "Type": "Minor",
+ "ChangelogMessages": [
+ "Graduate ILambdaContext.Serializer from experimental to stable. The AWSLAMBDA001 experimental diagnostic is removed; the managed runtime now populates the serializer in both the executable and class-library programming models."
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.autover/changes/89f7d5f8-2c64-446f-b146-1dfdac656c86.json b/.autover/changes/89f7d5f8-2c64-446f-b146-1dfdac656c86.json
new file mode 100644
index 000000000..8620d99e0
--- /dev/null
+++ b/.autover/changes/89f7d5f8-2c64-446f-b146-1dfdac656c86.json
@@ -0,0 +1,11 @@
+{
+ "Projects": [
+ {
+ "Name": "Amazon.Lambda.TestUtilities",
+ "Type": "Minor",
+ "ChangelogMessages": [
+ "Graduate TestLambdaContext.Serializer from experimental to stable, mirroring the graduation of ILambdaContext.Serializer. The AWSLAMBDA001 experimental diagnostic is removed."
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Libraries/src/Amazon.Lambda.Core/ILambdaContext.cs b/Libraries/src/Amazon.Lambda.Core/ILambdaContext.cs
index 21f7a54f6..bcdce39df 100644
--- a/Libraries/src/Amazon.Lambda.Core/ILambdaContext.cs
+++ b/Libraries/src/Amazon.Lambda.Core/ILambdaContext.cs
@@ -1,7 +1,6 @@
namespace Amazon.Lambda.Core
{
using System;
- using System.Diagnostics.CodeAnalysis;
///
/// Object that allows you to access useful information available within
@@ -107,13 +106,6 @@ public interface ILambdaContext
/// Can be null when the function did not register a serializer (e.g., raw-stream
/// handlers).
///
- ///
- /// Preview API. Class-library mode requires an updated managed
- /// Lambda runtime to populate this property; until that ships, the value will
- /// be null when running in class-library mode. The
- /// is applied to surface this caveat at the call site.
- ///
- [Experimental("AWSLAMBDA001")]
ILambdaSerializer Serializer { get { return null; } }
#endif
}
diff --git a/Libraries/src/Amazon.Lambda.DurableExecution.Testing/Amazon.Lambda.DurableExecution.Testing.csproj b/Libraries/src/Amazon.Lambda.DurableExecution.Testing/Amazon.Lambda.DurableExecution.Testing.csproj
index 47dc01892..89295a863 100644
--- a/Libraries/src/Amazon.Lambda.DurableExecution.Testing/Amazon.Lambda.DurableExecution.Testing.csproj
+++ b/Libraries/src/Amazon.Lambda.DurableExecution.Testing/Amazon.Lambda.DurableExecution.Testing.csproj
@@ -13,7 +13,6 @@
enable
enable
true
- $(NoWarn);AWSLAMBDA001
diff --git a/Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj b/Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj
index 2caf1fd68..f192819ee 100644
--- a/Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj
+++ b/Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj
@@ -16,10 +16,6 @@
enable
true
IL2026,IL2067,IL2075,IL3050
-
- $(NoWarn);AWSLAMBDA001
diff --git a/Libraries/src/Amazon.Lambda.TestUtilities/TestLambdaContext.cs b/Libraries/src/Amazon.Lambda.TestUtilities/TestLambdaContext.cs
index 07723b13c..b472403e0 100644
--- a/Libraries/src/Amazon.Lambda.TestUtilities/TestLambdaContext.cs
+++ b/Libraries/src/Amazon.Lambda.TestUtilities/TestLambdaContext.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
@@ -87,11 +86,6 @@ public class TestLambdaContext : ILambdaContext
/// to mirror the serializer that the Lambda runtime support library would attach
/// in production.
///
- ///
- /// Preview API. Mirrors the experimental ILambdaContext.Serializer
- /// surface so test code opts in via the same AWSLAMBDA001 diagnostic.
- ///
- [Experimental("AWSLAMBDA001")]
public ILambdaSerializer Serializer { get; set; }
}
}
diff --git a/Libraries/test/Amazon.Lambda.Core.Tests/TestLambdaContextSerializerTest.cs b/Libraries/test/Amazon.Lambda.Core.Tests/TestLambdaContextSerializerTest.cs
index c806609ee..942373bac 100644
--- a/Libraries/test/Amazon.Lambda.Core.Tests/TestLambdaContextSerializerTest.cs
+++ b/Libraries/test/Amazon.Lambda.Core.Tests/TestLambdaContextSerializerTest.cs
@@ -1,6 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
-#pragma warning disable AWSLAMBDA001 // ILambdaContext.Serializer is preview; this is the test that proves it works.
using System.IO;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/CallbackOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/CallbackOperationTests.cs
index a826c0c10..448a5ce7f 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/CallbackOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/CallbackOperationTests.cs
@@ -16,9 +16,7 @@ public class CallbackOperationTests
private static string IdAt(int position) => OperationIdGenerator.HashOperationId(position.ToString());
private static TestLambdaContext CreateLambdaContext() =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private static (DurableContext context, RecordingBatcher recorder, TerminationManager tm, ExecutionState state)
CreateContext(InitialExecutionState? initialState = null)
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ChildContextOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ChildContextOperationTests.cs
index 2559760ea..04fbeba29 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ChildContextOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ChildContextOperationTests.cs
@@ -25,9 +25,7 @@ private static (DurableContext context, RecordingBatcher recorder, TerminationMa
state.LoadFromCheckpoint(initialState);
var tm = new TerminationManager();
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var recorder = new RecordingBatcher();
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext, recorder.Batcher);
return (context, recorder, tm, state);
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableContextTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableContextTests.cs
index 76d7b748a..5c9117b8e 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableContextTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableContextTests.cs
@@ -19,9 +19,7 @@ public class DurableContextTests
private static string IdAt(int position) => OperationIdGenerator.HashOperationId(position.ToString());
private static TestLambdaContext CreateLambdaContext() =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private static DurableContext CreateContext(
InitialExecutionState? initialState = null,
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableFunctionTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableFunctionTests.cs
index 8727a5c8b..187d574ba 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableFunctionTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableFunctionTests.cs
@@ -20,9 +20,7 @@ public class DurableFunctionTests
private static string IdAt(int position) => OperationIdGenerator.HashOperationId(position.ToString());
private static TestLambdaContext CreateLambdaContext() =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private readonly IAmazonLambda _mockClient = new MockLambdaClient();
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/InvokeOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/InvokeOperationTests.cs
index c69568ca9..688520f3e 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/InvokeOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/InvokeOperationTests.cs
@@ -23,9 +23,7 @@ private static (DurableContext context, RecordingBatcher recorder, TerminationMa
state.LoadFromCheckpoint(initialState);
var tm = new TerminationManager();
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var recorder = new RecordingBatcher();
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext, recorder.Batcher);
return (context, recorder, tm, state);
@@ -475,9 +473,7 @@ public async Task EndToEnd_StepInvokeStep_FirstInvocation_SuspendsOnInvoke()
var state = new ExecutionState();
state.LoadFromCheckpoint(null);
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var batcher = new RecordingBatcher();
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext, batcher.Batcher);
@@ -527,9 +523,7 @@ public async Task EndToEnd_StepInvokeStep_SecondInvocation_ResumesAndCompletes()
});
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext);
var finalizeRan = false;
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/MapOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/MapOperationTests.cs
index 005232eb0..645ccba3b 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/MapOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/MapOperationTests.cs
@@ -22,9 +22,7 @@ private static (DurableContext context, RecordingBatcher recorder, TerminationMa
state.LoadFromCheckpoint(initialState);
var tm = new TerminationManager();
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var recorder = new RecordingBatcher();
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext, recorder.Batcher);
return (context, recorder, tm, state);
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ParallelOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ParallelOperationTests.cs
index ab6962898..60b674543 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ParallelOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/ParallelOperationTests.cs
@@ -25,9 +25,7 @@ private static (DurableContext context, RecordingBatcher recorder, TerminationMa
state.LoadFromCheckpoint(initialState);
var tm = new TerminationManager();
var idGen = new OperationIdGenerator();
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
var lambdaContext = new TestLambdaContext { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
var recorder = new RecordingBatcher();
var context = new DurableContext(state, tm, new WorkflowCancellation(tm), idGen, "arn:test", lambdaContext, recorder.Batcher);
return (context, recorder, tm, state);
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForCallbackTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForCallbackTests.cs
index 3596eb856..e9eb811ca 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForCallbackTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForCallbackTests.cs
@@ -19,9 +19,7 @@ private static string ChildIdAt(string parentOpId, int position) =>
OperationIdGenerator.HashOperationId($"{parentOpId}-{position}");
private static TestLambdaContext CreateLambdaContext() =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private static (DurableContext context, RecordingBatcher recorder, TerminationManager tm, ExecutionState state)
CreateContext(InitialExecutionState? initialState = null)
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForConditionOperationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForConditionOperationTests.cs
index 3ecb2a108..305ed1927 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForConditionOperationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitForConditionOperationTests.cs
@@ -15,9 +15,7 @@ public class WaitForConditionOperationTests
private static string IdAt(int position) => OperationIdGenerator.HashOperationId(position.ToString());
private static TestLambdaContext CreateLambdaContext(ILambdaSerializer? serializer = null) =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = serializer ?? new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private static (DurableContext context, RecordingBatcher recorder, TerminationManager tm, ExecutionState state)
CreateContext(InitialExecutionState? initialState = null, ILambdaSerializer? serializer = null)
diff --git a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WorkflowCancellationTests.cs b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WorkflowCancellationTests.cs
index b3af751ee..fd32b0441 100644
--- a/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WorkflowCancellationTests.cs
+++ b/Libraries/test/Amazon.Lambda.DurableExecution.Tests/WorkflowCancellationTests.cs
@@ -17,9 +17,7 @@ namespace Amazon.Lambda.DurableExecution.Tests;
public class WorkflowCancellationTests
{
private static TestLambdaContext CreateLambdaContext() =>
-#pragma warning disable AWSLAMBDA001 // TestLambdaContext.Serializer is experimental.
new() { Serializer = new DefaultLambdaJsonSerializer() };
-#pragma warning restore AWSLAMBDA001
private sealed record Harness(
DurableContext Context,
diff --git a/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaContextSerializerTests.cs b/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaContextSerializerTests.cs
index 8b62c25ef..034ccc530 100644
--- a/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaContextSerializerTests.cs
+++ b/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaContextSerializerTests.cs
@@ -12,7 +12,6 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-#pragma warning disable AWSLAMBDA001 // ILambdaContext.Serializer is preview; this is the test that proves it works.
using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport.Bootstrap;
using Amazon.Lambda.RuntimeSupport.Helpers;