-
Notifications
You must be signed in to change notification settings - Fork 41
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
Various issues with examples #169
Comments
Yes, some of them should be tested continuously -- concretely: https://github.com/open-policy-agent/npm-opa-wasm/tree/main/examples/nodejs-ts-app Can you check if the build process has run correctly for the example, like done in the script? https://github.com/open-policy-agent/npm-opa-wasm/blob/main/e2e.sh#L9-L10 |
Yes, it sure seems to:
tar: Removing leading '/' from member names (in case opa version helps): |
Interesting, the issue seems to be with my local opa build. I used 'example.wasm' that was pre-built here: and it worked as expected. Yet, there are no errors from the opa build command. Any ideas? |
Hrrm this could be related to argument parsing again. Perhaps the entrypoint got mangled by some powershell command, as in open-policy-agent/opa#3953. |
You could fiddle with the lib to inspect the entrypoints, see https://github.com/open-policy-agent/npm-opa-wasm/blob/main/src/opa.js#L290. I'm afraid there's no better tooling available right now. |
Thanks for the prompt answers. I will give it a try. Feel free to close as the issue is not with the examples themselves. |
Just tested the opa build command with double quotes and it does work. Perhaps a note for Windows (PowerShell) users would be in order. |
Agreed! Would pushing a PR for that against OPA be something you'd be up to? 😃 |
I submitted a PR and then modified it 3 times to try to make the linter happy but am now at a loss as to how to make it pass. Feel free to suggest edits or take the suggestion and apply it directly, tweaking it if needed. It should also be applied to the other 2 examples. Thanks! |
Have the examples been tested recently and are they supposed to work?
I have not been able to get any to work:
With nodejs-ts-app-multi-entrypoint I am getting:
Running multi entrypoint demo suite
Iterations: 100000 iterations of 10 inputs for 1000000 total evals per entrypoint
default entrypoint: 10.013s
ERROR: entrypoint example/one is not valid in this instance
With nodejs-ts-app I am getting an empty result:
[]
With nodejs-app I also get an empty result.
I am running Node.js v14.17.5 on Windows 10.
The text was updated successfully, but these errors were encountered: