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
Depending on the order of comparison ["a", "b"][_] == __dat.test versus __dat.test == ["a", "b"][_] opa panics during partial evaluation.
Steps to Reproduce the Problem
The following code contains four test examples. The first three are successful while the forth fails.
While tests 1 & 2 are successful, test 3 & 4 have a switched comparison in the allow_... rule. The switched comparison works for eval (test 3) but not for partial (test 4).
This panic only happens, when the __dat rule has an else clause.
@j-denner thanks for filing this. It looks like an issue in some of the term rewriting that's done to accept terms like ["a", "b"][_]. We'll get this fixed in the next release.
Previously the output var analysis would panic if it encountered refs
with non-var head terms. This assumption was invalidated in v0.17 with
the introduction of indirect refs.
Fixesopen-policy-agent#2678
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Expected Behavior
Partial evaluation should not panic.
Actual Behavior
Depending on the order of comparison
["a", "b"][_] == __dat.test
versus__dat.test == ["a", "b"][_]
opa panics during partial evaluation.Steps to Reproduce the Problem
The following code contains four test examples. The first three are successful while the forth fails.
While tests 1 & 2 are successful, test 3 & 4 have a switched comparison in the allow_... rule. The switched comparison works for eval (test 3) but not for partial (test 4).
This panic only happens, when the
__dat
rule has anelse
clause.The text was updated successfully, but these errors were encountered: