Closed turkenf closed 2 months ago
@turkenf, thanks for documenting the manual testing steps. We should also consider capturing this know-how in the uptest manifests (probably by executing them via the pre hooks) and automating the testing. We may even consider using an already available test image (I don't know its cost implications tbh).
I'm very supportive of @ulucinar's suggestion to fix this by disabling late initialization. It seems like that should fix the issues, but I'd also like to try some creative ideas to break it that will hopefully fail, both for zip lambdas and image-based ones.
AWS Lambda requires that its images come from AWS ECR in the same region as the lambda, but they can be from any aws account, as long as permissions are set appropriately. So I think it would work well to have a small, static lambda image hosted in ECR in a different aws account than is used for testing (so it doesn't get cloud-nuke'd), that we could use for testing from any aws account. It's worth checking, but I'd expect the cost to be minimal.
/test-examples="examples/lambda/v1beta1/function.yaml"
I close and re-open to trigger jobs.
/test-examples="examples/lambda/v1beta1/function.yaml"
Uptest run: https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/8818842854
Description of your changes
This PR fixes the update loop in the
Function.lambda
resource.Fixes: https://github.com/crossplane-contrib/provider-upjet-aws/issues/1027
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Repository.ecr
resource by applying the following:aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account_id>.dkr.ecr.us-east-1.amazonaws.com
docker build -t test-repo .
docker tag test-repo:latest <account_id>.dkr.ecr.us-east-1.amazonaws.com/test-repo:latest
docker push <account_id>.dkr.ecr.us-east-1.amazonaws.com/test-repo:latest
Function.lambda
resource by applying the following:imageUri
in theFunction.lambda
resource with the new one.