-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Bugfix/eventbridge/process to all matching rules #12090
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
maxhoheiser
merged 12 commits into
master
from
bugfix/eventbridge/process-to-all-matching-rules
Jan 7, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
513e4d6
feat: add test with multiple rules and multiple targets
maxhoheiser 2dc4c3b
feat: update default test event detail name
maxhoheiser 44e84e0
feat: add test multiple rules single target
maxhoheiser 671acad
feat: add test same target multiple rules different conditions
maxhoheiser 718f429
feat: add test multiple rules multiple patterns same target
maxhoheiser f364d37
fix: skip test for v1 provider
maxhoheiser 8c430dc
feat: add test target ids
maxhoheiser a960287
feat: test targets with same arn
maxhoheiser 3aad0af
fix: add input transformers
maxhoheiser cddfad5
feat: switch to unique_id for target factory store
maxhoheiser 5098065
Update localstack-core/localstack/services/events/target.py
maxhoheiser a91d8fc
Update tests/aws/services/events/test_events.py
maxhoheiser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 can see this is only used when deleting targets. However, from everything I can see in this PR,
Targets
are living inside aRule
. Shouldn't we delete allTargetSender
when deleting a rule? As we're caching the clients inside the sender, it could lead to quite some memory being taken and never released.I think that we should delete all the
TargetSender
when deleting a rule. This is somewhat outside of the scope of this PR, but also somewhat in it, because you chose to go the "nested" route in the dictionary key, when in reality, it seems the structure is morerule_arn
->target_id
->TargetSender
for the dict (self._target_sender_store[rule_arn][target_id]
), so it should have another level of nesting, so that when you delete therule
, you can dodel self._target_sender_store[rule_arn]
instead of having to iterate over all target and create the "nested key" every time. Both works, you just need to manipulate the key every time.Uh oh!
There was an error while loading. Please reload this page.
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.
So I like your approach for nesting targets under rules. Regarding deleting them - aws does not allow the deleting of a rule that still has targets - first all targets must be manually deleted - this takes care of the above-mentioned problem.