Skip to content

Graduate ILambdaContext.Serializer to stable (remove AWSLAMBDA001)#2485

Open
GarrettBeatty wants to merge 1 commit into
devfrom
graduate-ilambdacontext-serializer
Open

Graduate ILambdaContext.Serializer to stable (remove AWSLAMBDA001)#2485
GarrettBeatty wants to merge 1 commit into
devfrom
graduate-ilambdacontext-serializer

Conversation

@GarrettBeatty

Copy link
Copy Markdown
Contributor

Summary

Promotes ILambdaContext.Serializer from experimental to a stable public API by removing the [Experimental("AWSLAMBDA001")] attribute in Amazon.Lambda.Core, along with its mirror on TestLambdaContext.Serializer in Amazon.Lambda.TestUtilities.

The property was originally shipped experimental (added in #2378) because class-library mode required an updated managed Lambda runtime to populate it. That runtime work has shipped and is covered end-to-end:

  • Amazon.Lambda.RuntimeSupport populates the property on every invocation (LambdaBootstrap.SetSerializerOnContextcontext.Serializer = _serializer), including class-library mode after [assembly: LambdaSerializer] is resolved.
  • Amazon.Lambda.DurableExecution's ClassLibraryTest / TestFunctions/ClassLibraryFunction exercise it against the managed dotnet10 runtime.

So the "requires an updated managed runtime… until that ships" caveat no longer applies, and the API can graduate. The property remains legitimately nullable (raw-stream handlers / no registered serializer), documented as normal API behavior.

Changes

  • Remove [Experimental] + the "Preview API" remarks from ILambdaContext.Serializer and TestLambdaContext.Serializer; drop the now-unused System.Diagnostics.CodeAnalysis usings.
  • Remove the now-dead <NoWarn>AWSLAMBDA001</NoWarn> from Amazon.Lambda.DurableExecution and Amazon.Lambda.DurableExecution.Testing.
  • Remove the now-dead #pragma warning disable/restore AWSLAMBDA001 guards across Core, RuntimeSupport, and DurableExecution test files (45 pragma lines; no logic changed).
  • Add Minor change files for Amazon.Lambda.Core and Amazon.Lambda.TestUtilities (public API graduation).

Sequencing

This is the prerequisite for the Durable Execution GA (1.0.0) work in #2484 — it lands first so the GA PR no longer needs to carry the AWSLAMBDA001 suppression. #2484 has been updated to drop its csproj-comment edit so the two PRs don't collide.

Verification

Built clean (0 warnings, 0 errors) — the removed pragmas produced no "unnecessary pragma" warnings under TreatWarningsAsErrors:

  • Amazon.Lambda.Core, Amazon.Lambda.TestUtilities, Amazon.Lambda.DurableExecution, Amazon.Lambda.DurableExecution.Testing
  • Test projects: Amazon.Lambda.Core.Tests, Amazon.Lambda.DurableExecution.Tests, Amazon.Lambda.RuntimeSupport.UnitTests

Note

CA2252 suppressions in the Core/RuntimeSupport test csprojs are unrelated (they cover the separate ConfigureStructuredLogging preview feature) and are intentionally left in place.

Promote the ILambdaContext.Serializer API from experimental to stable by
removing the [Experimental("AWSLAMBDA001")] attribute in Amazon.Lambda.Core
and its mirror on TestLambdaContext.Serializer in Amazon.Lambda.TestUtilities.

The property was shipped experimental because class-library mode required an
updated managed runtime to populate it. That runtime work has shipped and is
covered end-to-end (RuntimeSupport's SetSerializerOnContext populates the
property; DurableExecution's ClassLibraryTest exercises it on managed dotnet10),
so the caveat no longer applies.

- Remove [Experimental] + the "Preview API" remarks from ILambdaContext.Serializer
  and TestLambdaContext.Serializer; drop the now-unused
  System.Diagnostics.CodeAnalysis usings.
- Remove the now-dead <NoWarn>AWSLAMBDA001</NoWarn> from the DurableExecution and
  DurableExecution.Testing projects.
- Remove the now-dead "#pragma warning disable/restore AWSLAMBDA001" guards from
  Core, RuntimeSupport, and DurableExecution test files.
- Add Minor change files for Amazon.Lambda.Core and Amazon.Lambda.TestUtilities.

This is the prerequisite for the Durable Execution GA (1.0.0) change; it lands
first so the GA PR no longer needs the AWSLAMBDA001 suppression.
@GarrettBeatty
GarrettBeatty marked this pull request as ready for review July 20, 2026 20:41
@GarrettBeatty
GarrettBeatty requested review from a team as code owners July 20, 2026 20:41
@GarrettBeatty
GarrettBeatty requested a review from normj July 20, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant