-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: clarify how configuration is passed #10782
wasm: clarify how configuration is passed #10782
Conversation
Signed-off-by: Kuat Yessenov <kuat@google.com>
@@ -37,6 +37,8 @@ message VmConfig { | |||
config.core.v3.AsyncDataSource code = 3; | |||
|
|||
// The Wasm configuration used in initialization of a new VM (proxy_on_start). | |||
// `google.protobuf.Struct` and `google.protobuf.Value` are serialized as JSON before passing them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment in #10781
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any follow ups here? Do we want to specialize further types or just leave it at this for now?
/wait-any
I'm fine with this approach but let's wait for the discussion to finish on the linked issue. /wait-any |
I would like to see in the description the finite list of supported types and expected Envoy behaviour in that case. |
@yskopets Value is just a dynamic value in protobuf (see https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto). It has a list of options that could be directly serialized as string, number, JSON. |
Yes, but Will |
The difference is that |
I see your point about BytesValue. JSON doesn't have an easy way to wrap a byte array, and we don't want to force the use of protobuf for byte arrays. TBH this isn't implemented yet, so we're free to add other wrapper types and customize how they're passed to modules. |
Signed-off-by: Kuat Yessenov <kuat@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@htuch Should we also keep updating v2
docs?
@@ -36,7 +36,10 @@ message VmConfig { | |||
// The Wasm code that Envoy will execute. | |||
config.core.v3.AsyncDataSource code = 3; | |||
|
|||
// The Wasm configuration used in initialization of a new VM (proxy_on_start). | |||
// The Wasm configuration used in initialization of a new VM | |||
// (proxy_on_start). `google.protobuf.Struct` is serialized as JSON before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use name proxy_on_vm_start
instead of proxy_on_start
for consistency with https://github.com/proxy-wasm/spec/tree/master/abi-versions/vNEXT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave the naming for later? It's guaranteed to churn endlessly and will only freeze when the code lands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
@@ -70,6 +73,9 @@ message PluginConfig { | |||
|
|||
// Filter/service configuration used to configure or reconfigure a plugin | |||
// (proxy_on_configuration). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use name proxy_on_configure
instead of proxy_on_configuration
for consistency with https://github.com/proxy-wasm/spec/tree/master/abi-versions/vNEXT
Yeah good call we should do that, thanks. |
Why do we need to update v2? This is not even implemented, and when it does, they should just use v3. |
I'm fine either way, but generally for fields that exist already in v2 we have been updating the docs there also. |
Should we just delete v2 version then? I think it was desired to ship before v3 split, but now that v3 is separated, there is no need to maintain v2. |
Sure that would be great. |
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -4,5 +4,3 @@ WASM | |||
.. toctree:: | |||
:glob: | |||
:maxdepth: 2 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the entire file then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, +1, thanks.
/wait
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file still needs deleting?
/wait
Signed-off-by: Kuat Yessenov <kuat@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM FWIW, I missed this one originally.
Signed-off-by: Spencer Lewis <slewis@squareup.com> * master: (46 commits) allow specifying the API version of bootstrap from the command line (envoyproxy#10803) config: adding connect matcher (unused) (envoyproxy#10894) Add missing dependency on `assert.h` (envoyproxy#10918) Lower heap and disk space used by kafka tests (envoyproxy#10915) [tools] handle commits merged without PR in deprecated script (envoyproxy#10723) tools: including working tree in modified_since_last_github_commit.sh diff. (envoyproxy#10911) rocketmq_proxy: implement rocketmq proxy [docs] PR template to include commit message (envoyproxy#10900) docs: breaking long word to stop content overflow. (envoyproxy#10880) Delete legacy connection pool code. (envoyproxy#10881) wasm: clarify how configuration is passed (envoyproxy#10782) issue template: clarify security/crash reporting (envoyproxy#10885) api/faq: add entry on incremental xDS. (envoyproxy#10876) router: retry overloaded requests (envoyproxy#10847) Remove inclusion of pthread.h, not needed for linux compilation (envoyproxy#10895) request_id: Add option to always set request id in response (envoyproxy#10808) xray: Use correct types for segment document output (envoyproxy#10834) router: fixing a watermark bug for streaming retries (envoyproxy#10866) http: auditing Path() calls for safety with Pathless CONNECT (envoyproxy#10851) Remove hardcoded type urls Part.2 (envoyproxy#10848) ...
Signed-off-by: Kuat Yessenov kuat@google.com
Description: clarify how configuration is passed
Risk Level:
Testing:
Docs Changes: only
Release Notes:
Fixes #10781