Skip to content
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

wasm: fix support for non-cloneable Wasm runtimes. #16263

Merged
merged 1 commit into from
May 4, 2021

Conversation

PiotrSikora
Copy link
Contributor

Signed-off-by: Piotr Sikora [email protected]

Copy link
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/wait-any

@@ -106,7 +106,8 @@ Wasm::Wasm(WasmConfig& config, absl::string_view vm_key, const Stats::ScopeShare
Wasm::Wasm(WasmHandleSharedPtr base_wasm_handle, Event::Dispatcher& dispatcher)
: WasmBase(base_wasm_handle,
[&base_wasm_handle]() {
return createWasmVm(base_wasm_handle->wasm()->wasm_vm()->runtime());
return createWasmVm(absl::StrCat("envoy.wasm.runtime.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how this fix non-cloneable runtimes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_wasm_handle->wasm()->wasm_vm()->runtime() is part of Proxy-Wasm C++ Host, which returns "v8", etc.

createWasmVm(name) is Envoy's interface for Wasm Runtimes, which uses Envoy names "envoy.wasm.runtime.v8", etc.

As such, there was a mismatach when using this constructor (which is only used for non-cloneable runtimes, which we don't have right now), because calling createWasmVm("v8") returns "Failed to create Wasm VM using v8 runtime. Envoy was compiled without support for it", since that runtime name is unknown to Envoy.

@lizan lizan merged commit 40f6662 into envoyproxy:main May 4, 2021
gokulnair pushed a commit to gokulnair/envoy that referenced this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants