From 24b6a851d9a09395ff0661f227cb1be5bd989dec Mon Sep 17 00:00:00 2001 From: Joel Scheuner Date: Fri, 29 Nov 2024 16:27:03 +0100 Subject: [PATCH] Add deprecation for Java-based event ruler --- localstack-core/localstack/config.py | 3 ++- localstack-core/localstack/deprecations.py | 13 ++++++++++--- .../lambda_/event_source_mapping/pollers/poller.py | 2 -- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/localstack-core/localstack/config.py b/localstack-core/localstack/config.py index 58c76cdbdf586..eee306feb4481 100644 --- a/localstack-core/localstack/config.py +++ b/localstack-core/localstack/config.py @@ -846,9 +846,10 @@ def populate_edge_configuration( # get-function call. INTERNAL_RESOURCE_ACCOUNT = os.environ.get("INTERNAL_RESOURCE_ACCOUNT") or "949334387222" +# TODO: remove with 4.1.0 # Determine which implementation to use for the event rule / event filtering engine used by multiple services: # EventBridge, EventBridge Pipes, Lambda Event Source Mapping -# Options: python (default) | java (preview) +# Options: python (default) | java (deprecated since 4.0.3) EVENT_RULE_ENGINE = os.environ.get("EVENT_RULE_ENGINE", "python").strip() # ----- diff --git a/localstack-core/localstack/deprecations.py b/localstack-core/localstack/deprecations.py index fb1f32a36c68a..3bcbe735124ec 100644 --- a/localstack-core/localstack/deprecations.py +++ b/localstack-core/localstack/deprecations.py @@ -269,6 +269,11 @@ def is_affected(self) -> bool: "0.14.0", "This option has no effect anymore. Please use OPENSEARCH_ENDPOINT_STRATEGY instead.", ), + EnvVarDeprecation( + "PERSIST_ALL", + "2.3.2", + "LocalStack treats backends and assets the same with respect to persistence. Please remove PERSIST_ALL.", + ), EnvVarDeprecation( "DNS_LOCAL_NAME_PATTERNS", "3.0.0", @@ -299,9 +304,11 @@ def is_affected(self) -> bool: " Please remove PROVIDER_OVERRIDE_STEPFUNCTIONS.", ), EnvVarDeprecation( - "PERSIST_ALL", - "2.3.2", - "LocalStack treats backends and assets the same with respect to persistence. Please remove PERSIST_ALL.", + "EVENT_RULE_ENGINE", + "4.0.3", + "The Java-based event ruler is deprecated because our latest Python-native implementation introduced in 4.0.3" + " is faster, achieves great AWS parity, and fixes compatibility issues with the StepFunctions JSONata feature." + " Please remove EVENT_RULE_ENGINE.", ), ] diff --git a/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/poller.py b/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/poller.py index a4e068c08208f..272804f6f5a3d 100644 --- a/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/poller.py +++ b/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/poller.py @@ -21,8 +21,6 @@ class PipeStateReasonValues(PipeStateReason): # TODO: add others (e.g., failure) -POLL_INTERVAL_SEC: float = 1 - LOG = logging.getLogger(__name__)