-
Notifications
You must be signed in to change notification settings - Fork 273
Improve diagnostics on forbidden file write #3144
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
Comments
It may be possible to construct a This might be a little tricky to implement well because we wouldn't want Here is some bindgen output representing one of the tracing events we'd want to inspect: https://github.com/bytecodealliance/wasmtime/blob/66754e245ce04d6624c52e9a073f4510bb30c3b1/crates/component-macro/tests/expanded/simple-wasi_tracing_async.rs#L282-L285 |
Okay I can do this with a tracing layer but it's all a bit hideously stringy (basically looking for The linked test shows a |
The linked code is generated by wasmtime bindgen, so probably not worth trying to modify. You should be able to filter on the span fields which should be accessible via the |
When a guest attempts to write to the file system, it gets a "permission denied" error. For developers not familiar with Spin's stateless model, the reason for this can be non-obvious - after all, Spin itself has permission to write to the mapped directory - and can send them on a wild goose chase.
The current error is certainly the right result to return to the guest, but it might be good if we can provide more information to the operator (developer), indicating to them that:
This is currently tricky because we defer all permissions stuff to Wasmtime - we just preopen the tempdir with read only permissions, so have no opportunity to intercept writes and do something more informative with them.
The text was updated successfully, but these errors were encountered: