-
Notifications
You must be signed in to change notification settings - Fork 107
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
Panics in the SDK #310
Comments
However, it sounds like you're saying that those Also, how do you plan to handle those cases that should never happen gracefully in your plugin?
The hostcalls are public interfaces, so that's already possible (although, it wouldn't override invalid / duplicate context_id panics in the dispatcher).
That should be already possible with
Could you elaborate on this? Is it a policy against |
Things can go wrong, and sadly will. From our plugin/solution's perspective they are actually many reasons things go wrong, excluding the SDK entirely here. Because of that we let users define what the behavior should be when "things don't go according to plan". Now we've hit weird cases that have been e.g. linked to "bad requests", not necessarily the SDK at all... might be UB afaict. As an example here, what if this isn't proper utf-8? Then there are other cases where the host, like in #237 isn't compliant, which... yes! Should be fixed, but then also means we can't provide our users with a working solution until it is fixed merged and released to them (where that last step can be somewhat cumbersome). That's where I'm coming from: embrace that things can go wrong, including because of "bad hosts", yet leave some possibility for the caller to deal with it. Hence the proposal of doing this "layered", e.g. the default trait impl "hide" the
Well, that means duplicating a lot of what the SDK already does too then, right? e.g. the bad utf-8 encoding again.
Sorta the perfect storm really, envoy starving workers as the wasm modules panics... And while newer versions cope with that (or have so far), we're all humans, we write code and all humans writing code will eventually do mistakes... again. Murphy's Law I guess.
The issue there is no unwind, so yeah it is probably feasible to be a little more graceful at least and otherwise fallback to other means of reclaiming memory et al. But feels like a nuclear option, don't you think? Anyways, I'm just trying to come at it from a slightly different angle, while trying to preserve your intent of making bugs/invalid behavior really obvious. The question I try to answer is: how does one deal with such an issue until a fix becomes available to them? Enabling users to handle the |
@alexsnaps said in #282 (comment):
The text was updated successfully, but these errors were encountered: