-
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
Add -t/--target flags to the other subcommands #2878
Comments
We might need the logic from the compile package that is used by I don't think we can depend on the compile package inside the rego package because that would create a circular dependency. |
ashutosh-narkar
added a commit
to ashutosh-narkar/opa
that referenced
this issue
Feb 4, 2021
This commit adds a target flag to the bench, eval, test and run (repl) commands which allows users to exercise the wasm rumtime. Fixes open-policy-agent#2878 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
ashutosh-narkar
added a commit
that referenced
this issue
Feb 5, 2021
This commit adds a target flag to the bench, eval, test and run (repl) commands which allows users to exercise the wasm rumtime. Fixes #2878 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
This was referenced Mar 9, 2021
This was referenced Mar 15, 2021
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice to be able to exercise the new wasm runtime through subcommands like
opa test
andopa eval
without having toopa build
beforehand. I could imagine adding-t
/--target
flags tobench
,eval
, andtest
. Foropa run
, I could imagine either adding the same flag or allowing users to toggle the execution target in the REPL and via the HTTP API.In terms of implementation, if we extend the
rego
package with an option to compile to wasm, the changes required in the subcommands would be minimal (i.e., they would just have to pipe the target flag down to therego.New()
call.)Since we don't yet support linking between policy.wasm files, we would need to disallow
-t
when loading bundles containing wasm compiled policies.The text was updated successfully, but these errors were encountered: