-
Notifications
You must be signed in to change notification settings - Fork 109
docs: improve the docs for containerd-shim-wasm crate #837
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
Conversation
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.
Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (6)
- crates/containerd-shim-wasm/src/container/engine.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/sandbox/instance_utils.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/sandbox/mod.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/sandbox/sync.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/container/context.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/container/path.rs: Evaluated as low risk
Comments suppressed due to low confidence (3)
crates/containerd-shim-wasm/README.md:5
- [nitpick] The term 'Wasm' should be consistently used as 'wasm' throughout the documentation.
A library to help build containerd shims for Wasm workloads.
crates/containerd-shim-wasm/README.md:13
- [nitpick] The sentence is grammatically correct but could be clearer. Consider rephrasing for clarity.
What trait to use depends on how much control you need over the container lifecycle and the level of sandboxing you want to provide.
crates/containerd-shim-wasm/README.md:32
- The return type should be
Result<i32, Error>
to include the error type.
fn run_wasi(&self, ctx: &impl RuntimeContext) -> Result<i32> {
@@ -19,7 +19,7 @@ pub(crate) use context::WasiContext; | |||
pub use context::{Entrypoint, RuntimeContext, Source}; | |||
pub use engine::Engine; | |||
pub use instance::Instance; | |||
pub use path::PathResolve; | |||
pub(crate) use path::PathResolve; |
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.
Why is this moved to crate
?
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.
Do we have an external use case for this trait? I am not aware so I made it a private one.
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.
Mostly just wondering. I don't know of any, Did we check our downstream users? Spin-kube in particular?
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.
Yes, SpinKube is not using this trait
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.
great improvements!
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.
Note: Setting
no_reaper
to true makes the shim stop working. We should probably create an issue in rust-extensions.
Okay I will do that
Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
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.
Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (6)
- README.md: Evaluated as low risk
- crates/containerd-shim-wasm/CHANGELOG.md: Evaluated as low risk
- crates/containerd-shim-wasm/src/container/context.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/container/engine.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/sandbox/mod.rs: Evaluated as low risk
- crates/containerd-shim-wasm/src/sandbox/sync.rs: Evaluated as low risk
Note that breaking change is in this PR that PathResolve is made to be
crate public
instead ofpublic
.Closes #823