-
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
Building a WASM Bundle with multiple entrypoints specified via metadata annotation will result in a panic #6661
Comments
I'm working on recreating a minimal example - will post when that's complete |
Using just the panic backtrace, I have good reason to believe that in I'll keep poking around to see if there's any obvious spots where |
So, after some back-and-forth with @dxh9845 in the OPA Slack, I have good reason to believe the issue may actually be in how we handle entrypoint metadata annotations, specifically, it looks like we may be messing up cases where the entrypoint is seen both on the CLI and via an entrypoint annotation. |
Was able to recreate a minimal POC after narrowing down the problem. https://github.com/dxh9845/opa-broken-wasm-build-poc |
I now have a minimal testcase for repro in the |
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Co-authored-by: Daniel Herzig <danielherzig96@gmail.com> Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Co-authored-by: Daniel Herzig <danielherzig96@gmail.com> Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Co-authored-by: Daniel Herzig <danielherzig96@gmail.com> Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: #6661 Co-authored-by: Daniel Herzig <danielherzig96@gmail.com> Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit fixes a panic that could occur when `opa build` was provided an entrypoint from both a CLI flag, and via entrypoint metadata annotation. The fix is simple: deduplicate the slice of entrypoint refs that the compiler uses, before compiling WASM or Plan targets. Fixes: open-policy-agent#6661 Co-authored-by: Daniel Herzig <danielherzig96@gmail.com> Signed-off-by: Philip Conrad <philipaconrad@gmail.com> Signed-off-by: Thomas Sidebottom <thomas.sidebottom@va.gov>
Short description
Building an OPA Bundle with WASM as the targer results in a nil panic. I can replicate this consistently in both Linux and Mac Darwin Arm64 variants of OPA. It appears that this behavior was introduced in version v0.59.0
Examples:
Steps To Reproduce
The text was updated successfully, but these errors were encountered: