Early Exit in iteration with http.send #704
-
Hi, I have a question regarding early exit in Rego rules that involve iterations and the use of http.send. We have the following example:
Based on the documentation about early exit from https://www.openpolicyagent.org/docs/policy-performance#early-exit-in-rule-evaluation, I would expect the rule to stop evaluation and return true as soon as the first HTTP request returns with is_member == true. However, according to the logs, an HTTP request is sent for every possible item in the input list, even after some requests have already returned is_member == true. Is this the expected behavior? Does early exit not work with http.send, or is there a way to make the rule stop iterating once an http.send call returns is_member == true? We use policy compiled into wasm bundle. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I tried the same policy with rego bundle instead of wasm and there it seems to be working. Is wasm an issue in this case? Is there a plan to make EE work with WASM? |
Beta Was this translation helpful? Give feedback.
You're right, EE isn't a thing in wasm. Can you create an issue, please?