aws / aws-lambda-dotnet

Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Apache License 2.0
1.58k stars 477 forks source link

Replace reference of LogLevel enum from Core to RuntimeSupport version #1820

Closed normj closed 2 months ago

normj commented 2 months ago

Description of changes: While building the OCI images that include the new structured logging support the smoke tests failed due to the fact that the smoke test function had an old reference of Amazon.Lambda.Core that didn't have the LogLevel enum defined. The RuntimeSupport package had an unintended reference to the LogLevel enum that caused an undefined enum exception when an unhandled exception. This PR updates the LogLevel reference to the version defined in RuntimeSupport.

This only affects when deploying functions as a class library because the executable programming model will have a version of Amazon.Lambda.Core that matches with Amazon.Lambda.RuntimeSupport expects. So we don't need to patch the NuGet package and just need to get master updated which the OCI image builders use.

Testing

After change all OCI smoke tests pass. The test function is still referencing the old version of Amazon.Lambda.Core to exercise this corner case.