Skip to content
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

Custom functions passed through the rego package should be able to halt evaluation #3534

Closed
tsandall opened this issue Jun 4, 2021 · 0 comments · Fixed by #3645
Closed

Comments

@tsandall
Copy link
Member

tsandall commented Jun 4, 2021

Currently, custom functions passed through the rego package cannot halt evaluation. Any errors returned by the custom function are wrapped as topdown.Error which doesn't halt evaluation. We should extend the rego package to expose a halting error type that gets converted into topdown.Halt.

srenatus added a commit to srenatus/opa that referenced this issue Jul 13, 2021
Before, functions provided via arguments to `rego.New()` hadn't been
able to halt the topdown evaluation.

Now, they do, if they return a `*rego.HaltError`.

Fixes open-policy-agent#3534.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus added a commit that referenced this issue Jul 13, 2021
Before, functions provided via arguments to `rego.New()` hadn't been
able to halt the topdown evaluation.

Now, they do, if they return a `*rego.HaltError`.

Fixes #3534.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dolevf pushed a commit to dolevf/opa that referenced this issue Nov 4, 2021
…-agent#3645)

Before, functions provided via arguments to `rego.New()` hadn't been
able to halt the topdown evaluation.

Now, they do, if they return a `*rego.HaltError`.

Fixes open-policy-agent#3534.

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
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant