Skip to content

fix: Update support for DeadLetterConfig #134

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

Merged

Conversation

Vandita2020
Copy link
Member

Description:
This PR adds the missing update feature for DeadLetterConfig property in Function resource.

Acknowledgement:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from a-hilaly and vijtrip2 April 1, 2024 22:43
@ack-prow ack-prow bot added the approved label Apr 1, 2024
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @Vandita2020 ! Left few comments in-line

@@ -604,6 +604,67 @@ def test_function_architecture(self, lambda_client):
# Check Lambda function doesn't exist
assert not lambda_validator.function_exists(resource_name)

def test_function_features(self, lambda_client):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is failing with this error message:

 2024-04-01T22:47:58.673Z	DEBUG	ackrt	<< r.createResource	{"kind": "Function", "namespace": "default", "name": "functionfeatures-6ihswvx", "account": "566350749442", "role": "", "region": "us-west-2", "is_adopted": false, "generation": 1, "error": "InvalidParameterValueException: The provided execution role does not have permissions to call SendMessage on SQS\n{\n  RespMetadata: {\n    StatusCode: 400,\n    RequestID: \"ee5cd503-5f8a-4c66-a8e5-88473a1fb18a\"\n  },\n  Message_: \"The provided execution role does not have permissions to call SendMessage on SQS\",\n  Type: \"User\"\n}"} 

It looks like we need to add more permissions to Role we create during the bootstrap. Maybe we can introduce a new role for DLQ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out the error, I have used another Role now. This role will give permission to access SQS.

runtime: python3.9
handler: main
deadLetterConfig:
targetARN: $TARGET_ARN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit:

Suggested change
targetARN: $TARGET_ARN
targetARN: $DEAD_LETTER_CONFIG_TARGET_ARN

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Vandita2020 Vandita2020 force-pushed the update_dead_letter_config branch 2 times, most recently from f70289f to a3999d4 Compare April 3, 2024 21:36
@Vandita2020 Vandita2020 force-pushed the update_dead_letter_config branch from a3999d4 to 0d71257 Compare April 16, 2024 22:20
@Vandita2020 Vandita2020 force-pushed the update_dead_letter_config branch from 0d71257 to 0e4be83 Compare April 16, 2024 23:43
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Thank you @Vandita2020 !
/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2024
Copy link

ack-prow bot commented Apr 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, Vandita2020

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Vandita2020,a-hilaly]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit a9250ad into aws-controllers-k8s:main Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants