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

Projects with a mix of Zip and Image functions do not package correctly. #212

Open
normj opened this issue Apr 26, 2022 · 0 comments
Open
Labels
bug This issue is a bug. module/cli-ext p2 This is a standard priority issue queued

Comments

@normj
Copy link
Member

normj commented Apr 26, 2022

Describe the bug

When deploy a project using the deploy-serverless command. If the CloudFormation template has a mix of Image and Zip package type functions the packaged CloudFormation template with the links to the uploaded deployment bundles will be incorrect.

This is because deploy-serverless makes a cache of project bundles once per project path. Not expecting functions to have different deployment packages per function in the same project. If the template first declares a function as Image package type the tool will build the container image and push it to ECR. The function in the template will point to the image uri in ECR. If a second function is then processed of package type Zip the tool will see the project has already been build and will skip doing a dotnet publish and uploading to S3. The Code Uri to S3 will not point to valid location in S3 and the overall deployment will fail.

Expected Behavior

Both image and zip based functions are properly packaged and updated in the CloudFormation template before starting the CloudFormation stack creation.

Current Behavior

Stack fails to create.

Reproduction Steps

Have a collection of functions with some marked as package type Zip and others `Image.

Possible Solution

No response

Additional Information/Context

This is getting in the way of creating more robust integration testing for the Amazon.Lambda.Annotations package in the aws-lambda-dotnet repo.

Targeted .NET platform

.NET 6

CLI extension version

5.4.0 but the issue has existed since Image package type was introduced.

Environment details (OS name and version, etc.)

Any

@normj normj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. A and removed needs-triage This issue or PR still needs to be triaged. labels Apr 26, 2022
@ashishdhingra ashishdhingra added p1 This is a high priority issue queued and removed A labels Nov 1, 2022
@ashishdhingra ashishdhingra added p2 This is a standard priority issue and removed p1 This is a high priority issue labels May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/cli-ext p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants