Closed avinal closed 11 months ago
/assign
(assume expr = data.metadata.namespace == "foo" && (data.metadata.name == "bar" || data.metadata.name == "baz")
)
(data->'metadata'->>'namespace') = 'foo' AND ((data->'metadata'->>'name') = 'bar' OR (data->'metadata'->>'name') = 'baz')
(data->'metadata'->>'namespace') = 'foo' AND (data->'metadata'->>'name') = 'bar' OR (data->'metadata'->>'name') = 'baz'
data.metadata.namespace == "foo" && data.metadata.name == "bar" || data.metadata.name == "baz"
(
provided in the actual expr is not being added hence the final SQL output does not has any parentheses and the whole expression is considered one giant expr.
Expected Behavior
The command or API call using
||
in filter should respect the OR operator. For example, on running this commandthe response should only show TaskRuns that fulfill one or both other conditions.
Actual Behavior
It seems the CEL converter is not respecting the
()
boundary.Steps to Reproduce the Problem
Additional
Reported by @karthikjeeyar