Skip to content

Add "strict mode" validation to the Rego API #7355

Open
@anderseknert

Description

@anderseknert

While I think the Rego API is generally quite nice to work with, there's been more than one occasion where I've spent more time than I would have liked chasing down something unexpectedly not happening as I had anticipated... only to find out later that the option I provided had no effect due to where I set it, or that some other option would override that. Examples of this include:

  • Options that are only considered when set on a prepared query, or only when not set on a prepared query
  • rego.StoreReadAST having no effect if a Store has been provided
  • Mistakenly setting both Input/ParsedInput (or other non-parsed vs parsed options)

It's understandable how some options depend on other settings, or won't work in certain configurations, but it would save developers a lot of time if instead of silently accepting ineffectual options, there was at least an option to have such settings fail with an error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions