Graduate ILambdaContext.Serializer to stable (remove AWSLAMBDA001)#2485
Open
GarrettBeatty wants to merge 1 commit into
Open
Graduate ILambdaContext.Serializer to stable (remove AWSLAMBDA001)#2485GarrettBeatty wants to merge 1 commit into
GarrettBeatty wants to merge 1 commit into
Conversation
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Promotes
ILambdaContext.Serializerfrom experimental to a stable public API by removing the[Experimental("AWSLAMBDA001")]attribute inAmazon.Lambda.Core, along with its mirror onTestLambdaContext.SerializerinAmazon.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.RuntimeSupportpopulates the property on every invocation (LambdaBootstrap.SetSerializerOnContext→context.Serializer = _serializer), including class-library mode after[assembly: LambdaSerializer]is resolved.Amazon.Lambda.DurableExecution'sClassLibraryTest/TestFunctions/ClassLibraryFunctionexercise it against the manageddotnet10runtime.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
[Experimental]+ the "Preview API" remarks fromILambdaContext.SerializerandTestLambdaContext.Serializer; drop the now-unusedSystem.Diagnostics.CodeAnalysisusings.<NoWarn>AWSLAMBDA001</NoWarn>fromAmazon.Lambda.DurableExecutionandAmazon.Lambda.DurableExecution.Testing.#pragma warning disable/restore AWSLAMBDA001guards across Core, RuntimeSupport, and DurableExecution test files (45 pragma lines; no logic changed).Minorchange files forAmazon.Lambda.CoreandAmazon.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
AWSLAMBDA001suppression. #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.TestingAmazon.Lambda.Core.Tests,Amazon.Lambda.DurableExecution.Tests,Amazon.Lambda.RuntimeSupport.UnitTestsNote
CA2252suppressions in the Core/RuntimeSupport test csprojs are unrelated (they cover the separateConfigureStructuredLoggingpreview feature) and are intentionally left in place.