Skip to content

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Jan 22, 2025

Motivation

With the new native event rule engine introduced in 4.0.3, we deprecated the Java-based event rule engine to mitigate runtime conflicts if used simultaneously with the StepFunctions JSONata feature.

Changes

  • Remove the feature flag EVENT_RULE_ENGINE
  • Remove the Java-based event ruler implementation and all dependencies (i.e., LPM installer, plugin)

Implications

  • Apart from the failing test test_start_list_describe_canceled_replay with the Python-based event rule engine, we are unaware of other regressions. 👉 Turns out to be an unrelated provider bug, failing with a TypeError even with the Java engine. Clarified the skip message accordingly.
  • Given the complexity of the event rule engine, we cannot rule out unknown regressions in edge cases (e.g., as recently fixed in EventBridge: fix empty conditions in event rule engine #12154), but @bentsku was usually super quick to fix these quickly 🙇

@joe4dev joe4dev added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Jan 22, 2025
@joe4dev joe4dev added this to the 4.1 milestone Jan 22, 2025
@joe4dev joe4dev self-assigned this Jan 22, 2025
Copy link

github-actions bot commented Jan 22, 2025

S3 Image Test Results (AMD64 / ARM64)

  2 files    2 suites   4m 52s ⏱️
442 tests 389 ✅  53 💤 0 ❌
884 runs  778 ✅ 106 💤 0 ❌

Results for commit c6f3cc8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 22, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 53m 8s ⏱️ +13s
4 013 tests ±0  3 696 ✅ ±0  317 💤 ±0  0 ❌ ±0 
4 015 runs  ±0  3 696 ✅ ±0  319 💤 ±0  0 ❌ ±0 

Results for commit c6f3cc8. ± Comparison against base commit 81d9fb0.

♻️ This comment has been updated with latest results.

@bentsku
Copy link
Contributor

bentsku commented Jan 22, 2025

I've tried running test_start_list_describe_canceled_replay and it seems the exception might not be due to the event rule engine, at least it's not the first exception:

E             File "<>/localstack/localstack-core/localstack/services/events/provider.py", line 1183, in start_replay
E               events_to_replay = archive_service.get_events(
E                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E             File "<>/localstack/localstack-core/localstack/services/events/archive.py", line 133, in get_events
E               events_to_replay = self._filter_events_start_end_time(start_time, end_time)
E                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E             File "<>/localstack/localstack-core/localstack/services/events/archive.py", line 182, in _filter_events_start_end_time
E               return [
E                      ^
E             File "<>/localstack/localstack-core/localstack/services/events/archive.py", line 185, in <listcomp>
E               if event_start_time <= self._normalize_datetime(event["time"]) <= event_end_time
E                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E             File "<>/localstack/localstack-core/localstack/services/events/archive.py", line 174, in _normalize_datetime
E               return dt.replace(second=0, microsecond=0)
E                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           TypeError: str.replace() takes no keyword arguments

Might be worth investigating somewhere else than here, but I think we might be good now with no tests failing due to the event rule engine?

@joe4dev
Copy link
Member Author

joe4dev commented Jan 22, 2025

Might be worth investigating somewhere else than here, but I think we might be good now with no tests failing due to the event rule engine?

Yes, I came to the same conclusion. Even using the Java engine, test_start_list_describe_canceled_replay fails with this TypeError provider bug. I clarified the skip reason accordingly.

@joe4dev joe4dev force-pushed the remove-jpype-event-ruler branch from f026995 to c6f3cc8 Compare January 23, 2025 09:03
@joe4dev joe4dev marked this pull request as ready for review January 24, 2025 08:33
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for taking care of the cleanup 🧹 this looks great, and hopefully users will report issues that we can fix quickly if we do not already.

@joe4dev joe4dev merged commit 27be0b7 into master Jan 24, 2025
38 checks passed
@joe4dev joe4dev deleted the remove-jpype-event-ruler branch January 24, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants