From d0b1c5d684e6635e85163731374d81c6d40bd2ca Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Tue, 5 Mar 2024 12:19:46 +1100 Subject: [PATCH 1/2] revert aws image uri changes. --- cloud/aws/deploy/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/aws/deploy/service.go b/cloud/aws/deploy/service.go index 40e6093c6..bd086f6f3 100644 --- a/cloud/aws/deploy/service.go +++ b/cloud/aws/deploy/service.go @@ -224,7 +224,7 @@ func (a *NitricAwsPulumiProvider) Service(ctx *pulumi.Context, parent pulumi.Res a.lambdas[name], err = awslambda.NewFunction(ctx, name, &awslambda.FunctionArgs{ // Use repository to generate the URI, instead of the image, using the image results in errors when the same project is torn down and redeployed. // This appears to be because the local image ends up with multiple repositories and the wrong one is selected. - ImageUri: pulumi.Sprintf("%s:latest", repo.RepositoryUrl), + ImageUri: image.URI(), MemorySize: pulumi.IntPtr(typeConfig.Lambda.Memory), Timeout: pulumi.IntPtr(typeConfig.Lambda.Timeout), PackageType: pulumi.String("Image"), From 6bde133928657c923f54278845bf447acc1366cc Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Tue, 5 Mar 2024 12:39:25 +1100 Subject: [PATCH 2/2] Add follow on note on reversion. --- cloud/aws/deploy/service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/aws/deploy/service.go b/cloud/aws/deploy/service.go index bd086f6f3..c2e7aef72 100644 --- a/cloud/aws/deploy/service.go +++ b/cloud/aws/deploy/service.go @@ -224,6 +224,8 @@ func (a *NitricAwsPulumiProvider) Service(ctx *pulumi.Context, parent pulumi.Res a.lambdas[name], err = awslambda.NewFunction(ctx, name, &awslambda.FunctionArgs{ // Use repository to generate the URI, instead of the image, using the image results in errors when the same project is torn down and redeployed. // This appears to be because the local image ends up with multiple repositories and the wrong one is selected. + // XXX: Reverted change for the above comment as lambda image deployments were not rolling forward (under tag latest) + // causing intermittent deployment and runtime failures ImageUri: image.URI(), MemorySize: pulumi.IntPtr(typeConfig.Lambda.Memory), Timeout: pulumi.IntPtr(typeConfig.Lambda.Timeout),