-
Notifications
You must be signed in to change notification settings - Fork 86
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
Amazon.Lambda.Tools 5.12.1 breaks application publishing #351
Comments
Version 5.12.1 corrected how the tool evaluated MSBuild properties like In your case you have a
This is a change in behavior that I understand the argument is breaking behavior. I would prefer to keep using |
I'll try explicitly turning it off, but it should be off by default for publishing the Lambda anyway. The property shouldn't be evaluating as |
Nope, that didn't work either: martincostello/adventofcode@c8dbd01 The tool is incorrectly determining AoT usage and blocking the publishing. I already worked around a previous incorrect determination with some of the changes you can see in the diff here where I publish for AoT for Azure App Service, but not for Lambda: martincostello/adventofcode@930d5a5 |
I think what's missing is that you're not passing any of the aws-extensions-for-dotnet-cli/src/Amazon.Common.DotNetCli.Tools/Utilities.cs Lines 220 to 226 in 71b82fc
This is what I get running it manually: ❯ dotnet msbuild -getProperty:PublishAot .\src\AdventOfCode.Site\ -p:PublishForAWSLambda=false
true
❯ dotnet msbuild -getProperty:PublishAot .\src\AdventOfCode.Site\ -p:PublishForAWSLambda=true
❯ dotnet msbuild -getProperty:PublishAot .\src\AdventOfCode.Site\
true
Not adding in the properties causes the MSBuild evaluation to get the wrong result, causing a false-positive error. |
@martincostello That is a good catch that we should include the current msbuild parameters specified to |
That's fine - I can easily just ignore the dependabot PR and not take the change. No rush, so post-re:Invent to test any fix is absolutely fine. |
Here is the PR to include the |
Describe the bug
I have a toy application targeting .NET 9 that is deployed to both AWS Lambda as a custom runtime function and Azure App Service as a container.
A dependabot PR (martincostello/adventofcode#1980) updating Amazon.Lambda.Tools from 5.12.0 to 5.12.1 breaks publishing the application on Linux and Windows with one error and on macOS with a different error.
Linux and Windows
macOS
The tooling should not block the publish as the application is authored in a way that a working native AoT application is produced that works for an ARM64 custom runtime function.
Regression Issue
Expected Behavior
The lambda ZIP archive is produced for deployment.
Current Behavior
Publishing the application fails.
Reproduction Steps
build.ps1 -SkipTests
from the root of the repositoryPossible Solution
No response
Additional Information/Context
No response
Targeted .NET platform
.NET 9
CLI extension version
amazon.lambda.tools 5.12.1
Environment details (OS name and version, etc.)
Any
The text was updated successfully, but these errors were encountered: