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
internal wasm sdk: check ABI version #3146
Labels
Comments
This is relevant in #3627. I'll probably add it to that branch. |
6 tasks
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Jul 15, 2021
* wasm/sdk: check version, call old eval path for ABI 1.1 Fixes open-policy-agent#3146. * docs/wasm: document addition as ABI 1.2 * wasm-sdk: overwrite previous inputs, don't accumulate them There is a little room for optimization here, should the input ever grow so large that it eats up too much precious heap space, we could look into changing this so that the memory used for it can be reclaimed. * internal/compiler/wasm: commit generated wasm I've noticed that since the CI build running on macos-latest doesn't have docker installed, it cannot update these files itself at build time. We thus end up with macos binaries that have the wasm binary data from the main branch, not the PR. This can be observed from the test failure: Run make ci-binary-smoke-test-wasm BINARY=opa_darwin_amd64 chmod +x "_release/0.31.0-dev/opa_darwin_amd64" "_release/0.31.0-dev/opa_darwin_amd64" eval -t "wasm" 'time.now_ns()' make: *** [ci-binary-smoke-test-wasm] Error 2 { "errors": [ { "message": "caller not found: opa_eval (opa_eval)" } ] } Error: Process completed with exit code 2. Since I had previously commit the CSV data that drives the dead code elimination process, that optimization had failed to find a function it expected to have. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
added a commit
that referenced
this issue
Jul 15, 2021
* wasm/sdk: check version, call old eval path for ABI 1.1 Fixes #3146. * docs/wasm: document addition as ABI 1.2 * wasm-sdk: overwrite previous inputs, don't accumulate them There is a little room for optimization here, should the input ever grow so large that it eats up too much precious heap space, we could look into changing this so that the memory used for it can be reclaimed. * internal/compiler/wasm: commit generated wasm I've noticed that since the CI build running on macos-latest doesn't have docker installed, it cannot update these files itself at build time. We thus end up with macos binaries that have the wasm binary data from the main branch, not the PR. This can be observed from the test failure: Run make ci-binary-smoke-test-wasm BINARY=opa_darwin_amd64 chmod +x "_release/0.31.0-dev/opa_darwin_amd64" "_release/0.31.0-dev/opa_darwin_amd64" eval -t "wasm" 'time.now_ns()' make: *** [ci-binary-smoke-test-wasm] Error 2 { "errors": [ { "message": "caller not found: opa_eval (opa_eval)" } ] } Error: Process completed with exit code 2. Since I had previously commit the CSV data that drives the dead code elimination process, that optimization had failed to find a function it expected to have. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dolevf
pushed a commit
to dolevf/opa
that referenced
this issue
Nov 4, 2021
…ent#3627) * wasm/sdk: check version, call old eval path for ABI 1.1 Fixes open-policy-agent#3146. * docs/wasm: document addition as ABI 1.2 * wasm-sdk: overwrite previous inputs, don't accumulate them There is a little room for optimization here, should the input ever grow so large that it eats up too much precious heap space, we could look into changing this so that the memory used for it can be reclaimed. * internal/compiler/wasm: commit generated wasm I've noticed that since the CI build running on macos-latest doesn't have docker installed, it cannot update these files itself at build time. We thus end up with macos binaries that have the wasm binary data from the main branch, not the PR. This can be observed from the test failure: Run make ci-binary-smoke-test-wasm BINARY=opa_darwin_amd64 chmod +x "_release/0.31.0-dev/opa_darwin_amd64" "_release/0.31.0-dev/opa_darwin_amd64" eval -t "wasm" 'time.now_ns()' make: *** [ci-binary-smoke-test-wasm] Error 2 { "errors": [ { "message": "caller not found: opa_eval (opa_eval)" } ] } Error: Process completed with exit code 2. Since I had previously commit the CSV data that drives the dead code elimination process, that optimization had failed to find a function it expected to have. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com> Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ABI version introduced into capabilities in #3120 (via #3142) isn't check in OPA's internal Wasm SDK.
We should do that.
The text was updated successfully, but these errors were encountered: