generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the RuleCompiler::check function to validate a rule pattern, I am receiving the following issue despite the pattern being valid:
Input:
{
"$or": [{
"title": [{
"anything-but": ["Test"]
}]
}, {
"severity": [{
"numeric": ["=", 5]
}]
}]
}
Error message:
Unrecognized match type title at [Source: (String)"{ "$or": [{ "title": [{ "anything-but": ["Test"] }] }, { "severity": [{ "numeric": ["=", 5] }] }] }"; line: 3, column: 19]
Here "title" and "severity" are property keys of our JSON document and not reserved keywords but it seems to be hitting the validation logic at https://github.com/aws/event-ruler/blob/v1.8.1/src/main/software/amazon/event/ruler/RuleCompiler.java#L422 and failing.
To Reproduce
Invoke the check() function with the above payload
Expected behavior
check() function should return null as pattern is valid
Environment:
Java Version: JDK21
Ruler Package: 1.8.1
Additional context
We are internal SDO team
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working