-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(sqs): support for permission settings for dead letter source queues #28745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
I left some notes for minor adjustments.
Co-authored-by: Luca Pizzini <[email protected]>
Co-authored-by: Luca Pizzini <[email protected]>
Co-authored-by: Luca Pizzini <[email protected]>
Co-authored-by: Luca Pizzini <[email protected]>
@lpizzinidev Thank you for your review! I addressed your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying 👍
The implementation of the deadLetterQueue
property is pretty old and I think we should stick to the CloudFormation definition when possible for new props to avoid confusion.
Thank you for the confirmation. And I understand the policy on naming as well. |
const redrivePolicy = props.deadLetterQueue | ||
? { | ||
deadLetterTargetArn: props.deadLetterQueue.queue.queueArn, | ||
maxReceiveCount: props.deadLetterQueue.maxReceiveCount, | ||
} | ||
: undefined; | ||
|
||
const redriveAllowPolicy = props.redriveAllowPolicy ? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood this logic from reading the docs trings above, but in general this ternary condition is quite confusing for people who look at this piece of code for the first time. Would be nice to have a comment here explaining it (i.e. when sourcePolicy
is provided, default to use allow all permission ...).
Fairly minor change, and I'm happy to approve this PR.
@GavinZZ I've updated comments. Please confirm it again. |
Thank you for the contribution! Happy to approve once the CI passes. |
@GavinZZ Do you know why the CI has failed?? https://github.com/aws/aws-cdk/actions/runs/7680150613/job/20931832477?pr=28745 This problem seems to have occurred in other PRs as well. Run ./tools/@aws-cdk/prlint
env:
GITHUB_TOKEN: ***
PR_NUMBER:
PR_SHA:
REPO_ROOT: /home/runner/work/aws-cdk/aws-cdk
⌛ Fetching PR number [2](https://github.com/aws/aws-cdk/actions/runs/7680150613/job/20931832477?pr=28745#step:4:2)87[4](https://github.com/aws/aws-cdk/actions/runs/7680150613/job/20931832477?pr=28745#step:4:4)[5](https://github.com/aws/aws-cdk/actions/runs/7680150613/job/20931832477?pr=28745#step:4:5)
Error: Bad credentials |
@GavinZZ |
We're actively working on a fix on this issue. Sorry for the inconvenience. |
@mergify update |
✅ Branch has been successfully updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for contributing!
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…ues (aws#28745) This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue. ```ts declare const sourceQueue: sqs.IQueue; // Only the sourceQueue can specify this queue as the dead-letter queue. const queue1 = new sqs.Queue(this, 'Queue1', { redriveAllowPolicy: { sourceQueues: [sourceQueue], } }); // No source queues can specify this queue as the dead-letter queue. const queue2 = new sqs.Queue(this, 'Queue2', { redriveAllowPolicy: { redrivePermission: sqs.RedrivePermission.DENY_ALL, } }); ``` Closes aws#19766. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ues (#28745) This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue. ```ts declare const sourceQueue: sqs.IQueue; // Only the sourceQueue can specify this queue as the dead-letter queue. const queue1 = new sqs.Queue(this, 'Queue1', { redriveAllowPolicy: { sourceQueues: [sourceQueue], } }); // No source queues can specify this queue as the dead-letter queue. const queue2 = new sqs.Queue(this, 'Queue2', { redriveAllowPolicy: { redrivePermission: sqs.RedrivePermission.DENY_ALL, } }); ``` Closes #19766. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue.
Closes #19766.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license