Skip to content

opa inspect failure on custom funcs in policies #6457

Closed
@simar7

Description

Short description

Since version v0.59.0, any bundles that include custom functions in their policies have now started to fail as undefined function.

Steps To Reproduce

  1. Create a bundle with a policy that contains a custom function
  2. Package the bundle
  3. Run opa inspect on the bundle
  4. Observe: rego_type_error: undefined function custom.func.name.here

Expected behavior

While the error seems correct, there also doesn't seem to be a way to define and load a custom function used in policies either to enable opa inspect to not throw any errors.

Additional context

These custom functions are defined loaded via the Go SDK during OPA initialization. They work just fine when done so, but during opa inspect they fail as the OPA cli has no way to know about the definitions of these custom functions.

This error has started since v0.59.0. Prior versions are unaffected.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions