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

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

Open
anderseknert opened this issue Feb 10, 2025 · 0 comments
Open

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

anderseknert opened this issue Feb 10, 2025 · 0 comments

Comments

@anderseknert
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant