Comments (5)
Empty root id should also be valid. I think it is something else that makes the example not working.. Most likely tool chain. I have a pending #71 to update both tool chain and the example to use bazel. Have not yet got time to finish that.
Meanwhile, you can reference this guide: https://github.com/istio-ecosystem/wasm-extensions/blob/master/doc/write-a-wasm-extension-with-cpp.md, which will be blog posted with 1.9.
from proxy-wasm-cpp-sdk.
I'm not trying to get into an argument with you. I have retested it, and can confirm.
Using myproject.cc with static RegisterContextFactory register_ExampleContext(CONTEXT_FACTORY(ExampleContext), "my_root_id");
works; using it with static RegisterContextFactory register_ExampleContext(CONTEXT_FACTORY(ExampleContext));
doesn't.
When using "my_root_id"
my Istio EnvoyFilter contained
value:
config:
root_id: "my_root_id"
when using no string parameter to register_ExampleContext()
my EnvoyFilter contained
value:
config:
root_id: ""
The logs only appear when I use a non-empty root id. I will try to troubleshoot this to see if it is a problem with Istio, Envoy, or this SDK.
from proxy-wasm-cpp-sdk.
@esnible could you skip adding root_id
? Not sure if that makes a difference.
from proxy-wasm-cpp-sdk.
Further investigation. If I use root_id: "my_root_id"
vs root_id: ""
in my EnvoyFilter Pilot generates six nearly identical type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
and they are ACK'd and make it to Envoy's config_dump.
Istio and Envoy seem to have a disconnect between empty and null
root_id. I created istio/istio#30473 to discuss. XDS generates a "" root ID, and Envoy ignores it.
In both cases Envoy's logs show
2021-01-28T16:28:03.570764Z trace envoy wasm [host->vm] proxy_on_context_create(2, 0)
2021-01-28T16:28:03.570848Z trace envoy wasm [vm->host] env.proxy_get_property(2544, 14, 5247632, 5247628)
2021-01-28T16:28:03.571720Z trace envoy wasm [vm<-host] env.proxy_get_property return: 0
2021-01-28T16:28:03.571758Z trace envoy wasm [host<-vm] proxy_on_context_create return: void
with only the context ID varying.
I will do a further experiment trying to put a null value into the root_id.
from proxy-wasm-cpp-sdk.
Further information:
If I don't include a root_id
in my EnvoyFilter it works. So you are correct, there is nothing wrong with the lack of one in your README. You can close this issue, although I would recommend putting a root_id into the example as an enhancement to avoid people falling into the same pit I am falling in.
I learned one more weird thing. I also tried root_id: ~
which SHOULD set root_id to the nil pointer rather than the empty string.
When I did that, Envoy logged some unexpected things.
2021-01-28T17:00:01.308172Z debug envoy wasm expr_evaluate value error: No value with name "downstream_peer" found in Activation
2021-01-28T17:00:01.308191Z trace envoy wasm wasm log: [extensions/stats/plugin.cc:607]::report() Failed to evaluate expression: <downstream_peer.cluster_id>
I have no clue if that is a problem with Envoy, or this library, or the config Istio generates. If that log info is troubling please follow-up.
from proxy-wasm-cpp-sdk.
Related Issues (20)
- The function proxy_get_configuration() should be removed from the SDK
- Build failing in `envoyproxy/envoy-build-ubuntu:49aaeb8f5473f09b4ab37ef3233a5e8afb7f9ed8-arm64`
- Using an external library (in my case, librdkafka) HOT 3
- Is it possible to get underlying socket? HOT 1
- Support for exceptions .. Disabling emscripten-cxx-exceptions HOT 6
- wasm-ld: error: /sdk/libprotobuf.a(common.o): undefined symbol HOT 2
- Failed to load Wasm module due to a missing import: env.getaddrinfo
- does it support grpc protocol process HOT 3
- does it support grpc decode? HOT 1
- Build wasm(libprotobuf.a failed with undefined symbol(std::__2::__basic_string_common<true>::__throw_length_error() const) HOT 2
- How to modify HTTP header "Content-Length" in onRequestBody/onResponseBody HOT 2
- Can Call onRequestTrailers() and onResponseTrailers unconditionally??? HOT 1
- You can use -flto in cflags for emsdk bazel
- Fix Bazel build with emsdk 3.1.7 HOT 2
- Consider implementing Wasm-side log level
- LOG macro conflicts HOT 4
- docker build error HOT 3
- How to resume filters after returning StopIteration in onRequestHeaders()? HOT 2
- Update protobuf libraries HOT 1
- Error building building example WASM filter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxy-wasm-cpp-sdk.