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 support for the new print() function #149

Closed
maxsmythe opened this issue Nov 10, 2021 · 1 comment
Closed

Add support for the new print() function #149

maxsmythe opened this issue Nov 10, 2021 · 1 comment
Assignees

Comments

@maxsmythe
Copy link
Contributor

Taken from:

open-policy-agent/gatekeeper#1654

from @tsandall

In v0.34.0 we added a new print() function that helps with simple debugging use cases. Library embeddings have to be updated to capture print() output. Without opt-in, print() statements are just erased from the policy at compile-time. Note, print() enablement might be better solved in the constraint framework. Feel free to close and move the issue over to constraints if you want.

Conftest was recently updated to support print(). See this PR: open-policy-agent/conftest#629

For more info on the print() function see this blog post: https://blog.openpolicyagent.org/introducing-the-opa-print-function-809da6a13aee


from @maxsmythe

Nice!

QQ about print: is it still subject to indexing (as in a rule that is not called because of indexing would lead to print not being called), or is it always called?

This definitely sounds like something that should go into the constraint framework.

@willbeason FYI

Closing this and re-opening there.

@willbeason
Copy link
Member

Done - print is explicitly enableable in #202

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

No branches or pull requests

2 participants