-
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
Fix return value when host property does not exist from data.selector #39
Conversation
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
Cargo.toml
Outdated
@@ -26,7 +26,7 @@ regex = "1" | |||
radix_trie = "0.2.1" | |||
|
|||
[dev-dependencies] | |||
proxy-wasm-test-framework = { git = "https://github.com/Kuadrant/wasm-test-framework.git", branch = "kuadrant" } | |||
proxy-wasm-test-framework = { git = "https://github.com/Kuadrant/wasm-test-framework.git", branch = "fix-get-property-when-none" } |
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.
this change will be reverted, only used for testing Kuadrant/wasm-test-framework#2
requires Kuadrant/wasm-test-framework#2 |
ready for review @alexsnaps |
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.
So sorry @eguzki - I had like 3 tabs open with this PR 🤦
What
Selectors in
rules[].data.selector[]
have adefault
named attribute to cover the use case where the property does not exist https://github.com/Kuadrant/wasm-shim/blob/main/src/configuration.rs#L7-L20When the selector property does not exist, the behavior is ruled by the
default
field. Currently the implementation was enforcing a default value (empty string""
) defeating the purpose of thedefault
attribute.Verification Steps
The wasm configuration applied for
*.a.com
isData selector should not generate return any value. Thus, descriptor should be empty and rate limiting service should not be called. Logs should not show any log from the limitador service or GRPC client.