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

rego+topdown: allow custom builtins via rego pkg to halt #3645

Conversation

srenatus
Copy link
Contributor

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.

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 srenatus marked this pull request as ready for review July 13, 2021 11:35
@srenatus srenatus merged commit bac1755 into open-policy-agent:main Jul 13, 2021
@srenatus srenatus deleted the sr/issue-3534/rego-builtins-should-be-able-to-halt-eval branch July 13, 2021 15:46
dolevf pushed a commit to dolevf/opa that referenced this pull request 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
None yet
Development

Successfully merging this pull request may close these issues.

Custom functions passed through the rego package should be able to halt evaluation
2 participants