New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opa test
panics when array ref present in test
#5496
Labels
Comments
philipaconrad
added a commit
to philipaconrad/opa
that referenced
this issue
Dec 21, 2022
This commit fixes a panic from a utility function in the `opa test` codepath. After the ref-heads change in open-policy-agent#4660, this particular function could be fed a ref that it didn't know how to work with, such as the innocuous line `a[0] := 1`, and it would then panic. This was fixed by returning a dummy value instead of panic'ing. Fixes: open-policy-agent#5496 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
philipaconrad
added a commit
that referenced
this issue
Dec 21, 2022
This commit fixes a panic from a utility function in the `opa test` codepath. After the ref-heads change in #4660, this particular function could be fed a ref that it didn't know how to work with, such as from the innocuous line `a[0] := 1`, and it would then panic. This was fixed by returning a dummy value instead of panic'ing. Fixes: #5496 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
philipaconrad
added a commit
to philipaconrad/opa
that referenced
this issue
Dec 21, 2022
…gent#5497) This commit fixes a panic from a utility function in the `opa test` codepath. After the ref-heads change in open-policy-agent#4660, this particular function could be fed a ref that it didn't know how to work with, such as from the innocuous line `a[0] := 1`, and it would then panic. This was fixed by returning a dummy value instead of panic'ing. Fixes: open-policy-agent#5496 Signed-off-by: Philip Conrad <philipaconrad@gmail.com> (cherry picked from commit a08934d)
philipaconrad
added a commit
that referenced
this issue
Dec 21, 2022
This commit fixes a panic from a utility function in the `opa test` codepath. After the ref-heads change in #4660, this particular function could be fed a ref that it didn't know how to work with, such as from the innocuous line `a[0] := 1`, and it would then panic. This was fixed by returning a dummy value instead of panic'ing. Fixes: #5496 Signed-off-by: Philip Conrad <philipaconrad@gmail.com> (cherry picked from commit a08934d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short description
opa test
only.The
opa test
command apparently panics when fed an array reference, as shown in the simple policy below. This does not affect the server or REPL in the same way; onlyopa test
currently seems to panic.Example:
array-panic.rego
Result:
Steps To Reproduce
opa test array-panic.rego
The text was updated successfully, but these errors were encountered: