Skip to content

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

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Feb 6, 2025

Note that breaking change is in this PR that PathResolve is made to be crate public instead of public.

pub(crate) use path::PathResolve;

Closes #823

Copy link

@Copilot Copilot AI left a 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;
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great improvements!

Copy link
Member Author

@Mossaka Mossaka left a 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

Copy link

@Copilot Copilot AI left a 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

@Mossaka Mossaka merged commit c82d9bc into containerd:main Feb 11, 2025
74 checks passed
@Mossaka Mossaka deleted the docs branch February 13, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The docs for containerd-shim-wasm is incomplete
3 participants