-
Notifications
You must be signed in to change notification settings - Fork 5
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 configuration v2 #37
Conversation
948697d
to
793ee32
Compare
LGTM so far, @eguzki. Nice job! |
13d1fa8
to
9fe81fc
Compare
18f5484
to
2350f7e
Compare
src/configuration.rs
Outdated
EqualOperator, | ||
#[serde(rename = "neq")] | ||
NotEqualOperator, | ||
#[serde(rename = "starts_with")] |
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.
RLPv2 specifies and effectively the Kuadrant Operator generates for the WasmPlugin config startswith
, not starts_with
.
In fact, while testing this branch, I've observed the following error thrown by the gateway:
2023-07-25T12:20:20.200842Z warning envoy wasm external/envoy/source/extensions/common/wasm/context.cc:1151 wasm log: failed to parse plugin config: unknown variant `startswith`, expected one of `eq`, `neq`, `starts_with`, `ends_with`, `matches` at line 1 column 184 thread=20
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.
Operators startswith
and endswith
do not match with how they are generated by the controller.
src/configuration.rs
Outdated
@@ -46,9 +46,9 @@ pub enum WhenConditionOperator { | |||
EqualOperator, | |||
#[serde(rename = "neq")] | |||
NotEqualOperator, | |||
#[serde(rename = "starts_with")] | |||
#[serde(rename = "startsWith")] |
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.
#[serde(rename = "startsWith")] | |
#[serde(rename = "startswith")] |
😬
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.
already pushed the changes :)
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.
oh, you mean startswith
, no camel case?
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.
ok ok... fixing it
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.
done
a4bac8a
to
e522bf6
Compare
@guicassolato ready for another review as you requested changes |
green 🥳 |
What
Fixes #35
Depends on Kuadrant/wasm-test-framework#1 for e2e tests to pass
Example to illustrate the new wasm shim configuration struct
proxy-wasm
to 0.2.1. Hit this issue Don't panic on unknown token_id in on_grpc_close. proxy-wasm/proxy-wasm-rust-sdk#154 and latest release includes the fixTODO:
matches
condition selector operator implementationselector
fields with escape char\
. Example: Input:this.is.a.exam\.ple
-> Retuns:["this", "is", "a", "exam.ple"]
. Some path segments include dot.
char in them. For instance envoy filter names:envoy.filters.http.header_to_metadata
Support data types other than(opened issue Selectors: support data types other than string from envoy attributes #38 for that)string
from envoy attributes https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/attributes