Skip to content
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

implement SNS Filter/operators $or, suffix, equals-ignore-case #10691

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Apr 19, 2024

Motivation

As reported in #9738, AWS launched new operators for SNS filtering. suffix and equals-ignore-case are pretty simple to implement, but $or necessitated a quite consequent rewrite, as the logic can get quite convoluted pretty fast. It quickly creates a lot of different forks, where one rule can have multiple branches and a payload can have multiple branches too if it contains array.

Changes

TODO

What's left to do:

  • write some AWS validated tests to check the limits, and verify some complicated cases
  • write better doc strings, as the logic changed a bit, and rename some obscure variable names

@bentsku bentsku added aws:sns Amazon Simple Notification Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Apr 19, 2024
@bentsku bentsku requested a review from joe4dev April 19, 2024 04:45
@bentsku bentsku self-assigned this Apr 19, 2024
Copy link

github-actions bot commented Apr 19, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 32m 32s ⏱️ -53s
2 890 tests +6  2 606 ✅ +6  284 💤 ±0  0 ❌ ±0 
2 892 runs  +6  2 606 ✅ +6  286 💤 ±0  0 ❌ ±0 

Results for commit 9d574ca. ± Comparison against base commit f6c21e3.

This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.
tests.aws.services.lambda_.test_lambda_api.TestLambdaSnapStart ‑ test_snapstart_update_function_configuration[java11]
tests.aws.services.lambda_.test_lambda_api.TestLambdaSnapStart ‑ test_snapstart_update_function_configuration[java21]
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_advanced_logging_configuration_format_switch
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_function_advanced_logging_configuration
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_function_partial_advanced_logging_configuration_update[partial_config0]
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_function_partial_advanced_logging_configuration_update[partial_config1]
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_function_partial_advanced_logging_configuration_update[partial_config2]
tests.aws.services.lambda_.test_lambda_api.TestLoggingConfig ‑ test_function_partial_advanced_logging_configuration_update[partial_config3]

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:sns Amazon Simple Notification Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants