-
Notifications
You must be signed in to change notification settings - Fork 102
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
Change callbacks to return specific response types #39
Conversation
This replaces the "Action" enum that is used when returning from the various callbacks to the specific callbacks types that are also used by the C++ SDK, such as FilterHeadersStatus, FilterDataStatus, and so on.
This is based on PR proxy-wasm#39 upstream. Brings us a step closer to what the C++ SDK uses. Signed-off-by: Alejandro Martinez Ruiz <[email protected]>
This is based on PR proxy-wasm#39 upstream. Brings us a step closer to what the C++ SDK uses. Signed-off-by: Alejandro Martinez Ruiz <[email protected]>
This is based on PR proxy-wasm#39 upstream. Brings us a step closer to what the C++ SDK uses. Signed-off-by: Alejandro Martinez Ruiz <[email protected]>
What's the actual reasoning behind this change? Which return values are you missing? In any case, API simplification was not the reason for a) It was developed while I was working on the updated ABI (proxy-wasm/spec#1), and b) The Proxy-Wasm effort is proxy-agnostic, and there is already work underway to implement it in other proxies, so adding Envoy specific return values is not desirable from that point of view. |
In the fullness of time, I can imagine needing to return things like FilterDataStatus::StopAllIterationAndWatermark, for instance, but my main problem was that I needed a way to return StopAllIterationAndWatermark instead of StopIteration. |
That should be fixed within the next few weeks once the ABI and SDKs are updated.
That's fixed now with proxy-wasm/proxy-wasm-cpp-host#95. |
I think I can hold off on this and if I get back to a specific problem, I'll see what I can do. |
Thanks! I expect to have the ABI finalized and SDKs updated in O(weeks), so I don't think this will be needed. |
@PiotrSikora when using
|
@aweis89 this is a bug in Envoy v1.17.x, see: envoyproxy/envoy#15496. |
Owe thanks @PiotrSikora for your speedy reply! Since you seem rather familiar with the fix 😉 , would you happen to know off the top if this will lead to a more serious issue other than a log message? |
@aweis89 Envoy crashes in debug builds... To be honest, I'm not 100% sure what happens in release builds, but it's either a crash or no side-effects. |
This replaces the "Action" enum that is used when returning from
the various callbacks to the specific callbacks types that are
also used by the C++ SDK, such as FilterHeadersStatus,
FilterDataStatus, and so on.
I understand that the original API was trying to present a somewhat simplified view of callbacks than the raw WASM ABI does, and that there are efforts to produce a better ABI. However, at the moment this change makes this SDK more understandable because it matches what internal Envoy code as well as the C++ SDK do, and since this is a low-level SDK, I think it should faithfully reproduce the whole ABI.