-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix put_targets validation regressions #11903
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 2m 35s ⏱️ - 40m 11s Results for commit deab555. ± Comparison against base commit 7c2d1e31. This pull request removes 1539 tests.
♻️ This comment has been updated with latest results. |
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.
Looks good!
@@ -1152,7 +1153,16 @@ def put_targets( | |||
failed_entries = rule_service.add_targets(targets) | |||
rule_arn = rule_service.arn | |||
rule_name = rule_service.rule.name | |||
for target in targets: # TODO only add successful targets | |||
for index, target in enumerate(targets): # TODO only add successful targets |
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.
came too late, but python tip: enumerate
takes a start
argument, avoiding this index+1
issue
for index, target in enumerate(targets, start=1):
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.
That is really cool, didn't know that!
Motivation
put_targets
does not validate invalid inputs fortarget_id
, which is a regression compared to EventBridge v1.Changes
put_targets