You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the upgrade to version 0.4 the syntax field.contains("value") doesn't work when evaluating a json input.
Is this by design or do I need to change anything on my implementation?
The error I am getting is: Rule evaluation error: ('no such overload', <class 'AttributeError'>, ("'str' object has no attribute 'contains'",))
If this is still reproducible, happy to look at adding/fixing the .contains() method on the StringType wrapper in celtypes.py. Would also add a test to prevent regressions.
Activity
x0day commentedon Aug 7, 2025
+1
hakucodes commentedon Aug 16, 2025
The same question
slott56 commentedon Aug 30, 2025
This is a feature request, really.
stefanvanburen commentedon Oct 6, 2025
@slott56 was this fixed by #126 / would it be valuable to cut a
v0.4.1with this fix?slott56 commentedon Nov 5, 2025
Good idea!
Quantum0uasar commentedon May 27, 2026
Checking in on this — is
.contains()still not working in the current version? The CEL spec definesstring.contains(string)as a standard macro (https://github.com/google/cel-spec/blob/master/doc/langdef.md#macros), so it should be supported.If this is still reproducible, happy to look at adding/fixing the
.contains()method on theStringTypewrapper inceltypes.py. Would also add a test to prevent regressions.