Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable creation of .NET Core 3.1 Lambda layers due to a issue in the… #114

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Amazon.Lambda.Tools/Commands/PublishLayerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ private async Task<CreateLayerZipFileResult> CreateRuntimePackageStoreLayerZipFi
var projectLocation = this.GetStringValueOrDefault(this.ProjectLocation, CommonDefinedCommandOptions.ARGUMENT_PROJECT_LOCATION, false);
var enableOptimization = this.GetBoolValueOrDefault(this.EnablePackageOptimization, LambdaDefinedCommandOptions.ARGUMENT_ENABLE_PACKAGE_OPTIMIZATION, false).GetValueOrDefault();

if(string.Equals(targetFramework, "netcoreapp3.1"))
{
var message = "Publishing runtime package store layers targeting .NET Core 3.1 is currently disabled due to an issue with the dotnet cli's 'store' command " +
"used to create the runtime package store. For further information see the following GitHub issue.\n" +
"https://github.com/dotnet/sdk/issues/10973";
throw new LambdaToolsException(message, LambdaToolsException.LambdaErrorCode.DisabledSupportForNET31Layers);
}

#if NETCORE
if (enableOptimization)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Amazon.Lambda.Tools/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public enum LambdaErrorCode {

FailedToFindZipProgram,
FailedToDetectSdkVersion,
LayerNetSdkVersionMismatch
LayerNetSdkVersionMismatch,

DisabledSupportForNET31Layers
}

public LambdaToolsException(string message, LambdaErrorCode code) : base(message, code.ToString(), null)
Expand Down