-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
topdown: functions with multiple outputs for one input don't trigger error when output isn't captured #3912
Labels
Comments
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Oct 25, 2021
With func1.rego as package test r(x) { data.test.q(x) } q(_) = true q(_) = false Before: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' true After: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' 1 error occurred: func1.rego:12: eval_conflict_error: functions must not produce multiple outputs for same inputs Fixes open-policy-agent#3912. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Checked what |
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Oct 27, 2021
With func1.rego as package test r(x) { data.test.q(x) } q(_) = true q(_) = false Before: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' true After: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' 1 error occurred: func1.rego:12: eval_conflict_error: functions must not produce multiple outputs for same inputs Fixes open-policy-agent#3912. Also adds a CHANGELOG item making the backwards-compat-breaking change prominent, and sharing an example of how to fix it. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
added a commit
that referenced
this issue
Oct 27, 2021
…3920) With func1.rego as package test r(x) { data.test.q(x) } q(_) = true q(_) = false Before: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' true After: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' 1 error occurred: func1.rego:12: eval_conflict_error: functions must not produce multiple outputs for same inputs Fixes #3912. Also adds a CHANGELOG item making the backwards-compat-breaking change prominent, and sharing an example of how to fix it. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dolevf
pushed a commit
to dolevf/opa
that referenced
this issue
Nov 4, 2021
…pen-policy-agent#3920) With func1.rego as package test r(x) { data.test.q(x) } q(_) = true q(_) = false Before: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' true After: $ opa eval -fpretty -d func1.rego 'data.test.r(1)' 1 error occurred: func1.rego:12: eval_conflict_error: functions must not produce multiple outputs for same inputs Fixes open-policy-agent#3912. Also adds a CHANGELOG item making the backwards-compat-breaking change prominent, and sharing an example of how to fix it. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com> Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
data.test.r(1)
true
data.test.p(1)
eval_conflict_error: functions must not produce multiple outputs for same inputs
data.test.q(1)
eval_conflict_error: functions must not produce multiple outputs for same inputs
data.test.r(1)
should return the same error, I suppose. The comparison withprev
is missing here, I think: https://github.com/open-policy-agent/opa/blob/v0.33.1/topdown/eval.go#L1697-L1701The text was updated successfully, but these errors were encountered: