Repository navigation
v2.2.0
Upgrade notes
Rule validation is stricter. A rule must contain one JSON object. Content after its closing brace is rejected, including extra punctuation, text, or another JSON value. Trailing whitespace remains valid. Revalidate stored rules before rebuilding machines with this version. See #277.
Two independent compatibility options support migration of existing stored rules. Both default to false:
- Trailing content:
Machine.builder().withTrailingContentIgnored(true).build()restores the earlier reading for that machine's JSONaddRuleanddeleteRulecalls.RuleCompiler.check()andJsonRuleCompiler.check()remain strict, so they can identify stored rules that need correction. Public compiler methods and the staticRulermatching helpers also retain strict validation. - Complexity behind absent keys:
new MachineComplexityEvaluator(maxComplexity).withComplexityBehindAbsentKeysIgnored(true)returns a new evaluator that omits machines reachable only through{"exists": false}patterns. Default evaluation keeps the corrected counting introduced in 2.1.0. Matching is unchanged. Use the default evaluator to validate new rules: the compatibility setting can report zero for an expensive wildcard rule. The returned evaluator keeps the cap, but not subclass overrides; subclasses can use the protected two-argument constructor. See #278.
Maven
Available on Maven Central:
<dependency>
<groupId>software.amazon.event.ruler</groupId>
<artifactId>event-ruler</artifactId>
<version>2.2.0</version>
</dependency>What's Changed
- Reject content after a rule's root object and add the per-machine trailing-content compatibility option, by @fym-rgb in #277.
- Add the complexity-evaluation compatibility option for machines behind absent-key patterns, by @fym-rgb in #278.
- Add a shared complexity-evaluator corpus, regression checks in the normal build, and an opt-in benchmark, by @fym-rgb (#273). The checks cover reported complexity, graph-walk counts, and evaluation bounds. Timing runs use
mvn test -Dtest=MachineComplexityEvaluatorBenchmarks -Druler.perf.run=true. - Document the dependency contribution policy, by @fym-rgb.
- Update
actions/setup-javafrom v4 to v6, by @dependabot in #268. - Update
maven-compiler-pluginfrom 3.15.0 to 3.16.0, by @dependabot in #275.
Runtime dependency versions and scopes are unchanged from 2.1.0.
Full Changelog: v2.1.0...v2.2.0