-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(events-targets): cannot set retry policy to 0 retry attempts #21900
Conversation
I just set a bad example here and did what I ask people not to do. So, just in case you have a reason to update the branch with a merge, please use |
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.
This bug is a great find. Thanks for submitting the fix! It looks great and nearly ready to go as is. We'll just need an integration test for this somewhere. Feel free to use an existing one and update it to have retryAttempts = 0
.
Additionally, please make sure that your PR title confirms to the conventional commit standard (fix, feat, chore) and that it is written in a style that will reflect correctly in the change log (See Contributing Guide, Pull Requests (https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#step-4-pull-request)).
Specifically from the guide fix: describe the bug (not the solution)
and Title should be lowercase.
Pull request has been modified.
Thanks for your feedback. I have updated the PR title to the best of my understanding as per the conventional commit standard. In case it is still not satisfactory, please do let me know. I have changed the existing lambda integration test to test for the 0 retry attempt case, and ran the integration test successfully on my local machine as well.
Hope this is sufficient. |
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). |
Currently, it is not possible to set 0 retry attempts for any of the EventBridge targets that support a retry policy as 0 is falsy value and hence the following conditional doesn't evaluate to true -
aws-cdk/packages/@aws-cdk/aws-events-targets/lib/util.ts
Lines 54 to 59 in c607ca5
Changed the conditional logic to allow 0 retry attempts for all supported targets along with unit tests.
fixes #21864
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license