From ebc4ed173c6589c3cbf57abd416f4b9a96ea880f Mon Sep 17 00:00:00 2001 From: Joel Scheuner Date: Tue, 26 Nov 2024 10:19:42 +0100 Subject: [PATCH] Add analytics for event rule engine --- localstack-core/localstack/runtime/analytics.py | 1 + localstack-core/localstack/services/events/plugins.py | 8 ++++++++ tests/aws/services/events/test_events_patterns.py | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 localstack-core/localstack/services/events/plugins.py diff --git a/localstack-core/localstack/runtime/analytics.py b/localstack-core/localstack/runtime/analytics.py index 226710c1dcc78..4ef2c4ba59ae0 100644 --- a/localstack-core/localstack/runtime/analytics.py +++ b/localstack-core/localstack/runtime/analytics.py @@ -31,6 +31,7 @@ "ES_CUSTOM_BACKEND", # deprecated in 0.14.0, removed in 3.0.0 "ES_MULTI_CLUSTER", # deprecated in 0.14.0, removed in 3.0.0 "ES_ENDPOINT_STRATEGY", # deprecated in 0.14.0, removed in 3.0.0 + "EVENT_RULE_ENGINE", "IAM_SOFT_MODE", "KINESIS_PROVIDER", # Not functional; deprecated in 2.0.0, removed in 3.0.0 "KINESIS_ERROR_PROBABILITY", diff --git a/localstack-core/localstack/services/events/plugins.py b/localstack-core/localstack/services/events/plugins.py new file mode 100644 index 0000000000000..82570e48cb20b --- /dev/null +++ b/localstack-core/localstack/services/events/plugins.py @@ -0,0 +1,8 @@ +from localstack.packages import Package, package + + +@package(name="event-ruler") +def event_ruler_package() -> Package: + from localstack.services.events.packages import event_ruler_package + + return event_ruler_package diff --git a/tests/aws/services/events/test_events_patterns.py b/tests/aws/services/events/test_events_patterns.py index 63c789cb01c78..1322c029b30ba 100644 --- a/tests/aws/services/events/test_events_patterns.py +++ b/tests/aws/services/events/test_events_patterns.py @@ -22,7 +22,7 @@ COMPLEX_MULTI_KEY_EVENT = os.path.join(REQUEST_TEMPLATE_DIR, "complex_multi_key_event.json") SKIP_LABELS = [ - # Failing exception tests: + # TODO: fix failing exception tests (not yet implemented) "arrays_empty_EXC", "content_numeric_EXC", "content_numeric_operatorcasing_EXC", @@ -31,7 +31,7 @@ "int_nolist_EXC", "operator_case_sensitive_EXC", "string_nolist_EXC", - # Failing tests: + # TODO: fix failing tests for Python event rule engine "complex_or", "content_anything_but_ignorecase", "content_anything_but_ignorecase_list",