Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions docs/development-environment-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ LocalStack runs its own [DNS server](https://docs.localstack.cloud/user-guide/to

* macOS users need to configure `LAMBDA_DEV_PORT_EXPOSE=1` such that the host can reach Lambda containers via IPv4 in bridge mode (see [#7367](https://github.com/localstack/localstack/pull/7367)).

#### EVENT_RULE_ENGINE=java

* Requires Java to execute to invoke the AWS [event-ruler](https://github.com/aws/event-ruler) using [JPype](https://github.com/jpype-project/jpype), a Python to Java bridge.
* Set `JAVA_HOME` to a JDK installation. For example: `JAVA_HOME=/opt/homebrew/Cellar/openjdk/21.0.2`

### Changing our fork of moto

1. Fork our moto repository on GitHub [https://github.com/localstack/moto](https://github.com/localstack/moto)
Expand Down
3 changes: 2 additions & 1 deletion localstack-core/localstack/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ def is_affected(self) -> bool:
EnvVarDeprecation(
"EVENT_RULE_ENGINE",
"4.0.3",
"The Java-based event ruler is deprecated because our latest Python-native implementation introduced in 4.0.3"
"This option is ignored because the Java-based event ruler has been removed since 4.1.0."
" 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.",
),
Expand Down
71 changes: 0 additions & 71 deletions localstack-core/localstack/services/events/event_ruler.py

This file was deleted.

38 changes: 0 additions & 38 deletions localstack-core/localstack/services/events/packages.py

This file was deleted.

8 changes: 0 additions & 8 deletions localstack-core/localstack/services/events/plugins.py

This file was deleted.

12 changes: 0 additions & 12 deletions localstack-core/localstack/utils/event_matcher.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import json
from typing import Any

from localstack import config
from localstack.services.events.event_rule_engine import (
EventPatternCompiler,
EventRuleEngine,
InvalidEventPatternException,
)
from localstack.services.events.event_ruler import matches_rule

_event_pattern_compiler = EventPatternCompiler()
_event_rule_engine = EventRuleEngine()
Expand Down Expand Up @@ -45,15 +42,6 @@ def matches_event(event_pattern: dict[str, Any] | str | None, event: dict[str, A
if not event_pattern:
return True

if config.EVENT_RULE_ENGINE == "java":
# If inputs are already strings (EventBridge), use directly
if isinstance(event, str) and isinstance(event_pattern, str):
return matches_rule(event, event_pattern)
# Convert dicts (ESM/Pipes) to strings for Java engine
event_str = event if isinstance(event, str) else json.dumps(event)
pattern_str = event_pattern if isinstance(event_pattern, str) else json.dumps(event_pattern)
return matches_rule(event_str, pattern_str)

# Python implementation (default)
compiled_event_pattern = _event_pattern_compiler.compile_event_pattern(
event_pattern=event_pattern
Expand Down
7 changes: 2 additions & 5 deletions tests/aws/services/events/test_archive_and_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest

from localstack import config
from localstack.testing.pytest import markers
from localstack.utils.strings import short_uid
from localstack.utils.sync import retry
Expand Down Expand Up @@ -363,10 +362,8 @@ def test_delete_archive_error_unknown_archive(self, aws_client, snapshot):
class TestReplay:
@markers.aws.validated
@pytest.mark.skipif(is_old_provider(), reason="not supported by the old provider")
@pytest.mark.skipif(
condition=config.EVENT_RULE_ENGINE == "python",
reason="Not supported with Python-based rule engine",
)
# TODO: Investigate and fix type error
@pytest.mark.skip(reason="Fails with `TypeError: str.replace() takes no keyword arguments`")
@pytest.mark.parametrize("event_bus_type", ["default", "custom"])
@pytest.mark.skip_snapshot_verify(paths=["$..State"])
def test_start_list_describe_canceled_replay(
Expand Down
Loading