-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Panic when creating a bundle with a policy with a single term package #7321
Comments
Able to repro with |
OPA started to panic in package <illegal path "data">
test = __result__ {
__result__ = {"foo": true}
} IMO, outputting an error (but not a panic) is better than silently outputting a broken bundle. Better, of course, is to make OPA not rearrange the package into an illegal path. Speculation: this looks to be a side effect of optimization being able to reduce everything inside the entrypoint to a single ground value. |
…lding Single term entrypoints has never been supported by OPA, this formalizes that behaviour through error reporting. Fixes: open-policy-agent#7321 Signed-off-by: Johan Fylling <[email protected]>
…lding (#7413) Single term entrypoints has never been supported by OPA, this formalizes that behaviour through error reporting. Fixes: #7321 Signed-off-by: Johan Fylling <[email protected]>
Short description
The documentation says that a single term package is valid and policy packaging without an optimization flag completes successfully. If there is a constraint on the package, it would be nice to return an error.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: