You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating and registering a custom built-in function and compiling a custom opa binary, opa build --bundle... should build a bundle for policy referencing the custom built-in function.
Actual Behavior
It fails with the following error:
error: 1 error occurred: /path/to/policy.rego:11: rego_type_error: undefined function <name_of_custom_func>
The build and check commands were retrieving registered builtins too
early during initial execution, which did not give enough time for
custom binaries to register custom builtin functions. This change
sets the initial capabilities flag to nil instead, and then retrieves built-ins
immediately prior to instantiating a new compiler. This prevents an
undefined function rego_type_error during the build and check commands.
Fixes#2738.
This is my commit message
Signed-off-by: Grant Shively <gshively@godaddy.com>
Expected Behavior
After creating and registering a custom built-in function and compiling a custom opa binary,
opa build --bundle...
should build a bundle for policy referencing the custom built-in function.Actual Behavior
It fails with the following error:
Steps to Reproduce the Problem
@patrick-east reproduced this using the example custom built-in in this comment.
Additional Info
This error does not occur when testing the same policy using
opa run
.The text was updated successfully, but these errors were encountered: