Skip to content
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

chore: update to the main tip of runwasi and libcontainer #138

Merged
merged 12 commits into from
Sep 2, 2023

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Sep 1, 2023

No description provided.

Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

Thanks @Mossaka for putting this change together!
I like where this is going a lot. I think these shims would benefit a lot from the simplified API.
I left a few commends where I think there are opportunities to simplify the code.
In particular:

  • I think the executors could be simplified by rewriting how the error handling is done.
  • In a few places the code uses select! with a single branch instead of .await, I'm not sure why.
  • In wws you could use Stdio to redirect stderr instead of working around it :-)

containerd-shim-lunatic-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-lunatic-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-lunatic-v1/src/executor.rs Outdated Show resolved Hide resolved
if let Some(stdout) = stdout {
dup(STDOUT_FILENO)?;
dup2(stdout, STDOUT_FILENO)?;
fn is_linux_executable(spec: &Spec) -> anyhow::Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

comment: this would be prime candidate for a utils 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.

Should go into the containerd-shim-wasmcrate

Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully with the simplified API we wouldn't need to expose it

containerd-shim-slight-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-wws-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-spin-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-spin-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-wws-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-wws-v1/src/executor.rs Outdated Show resolved Hide resolved
@jprendes
Copy link
Contributor

jprendes commented Sep 1, 2023

Mossaka/shims@update-to-newest-runwasi...jprendes:containerd-wasm-shims:bump-runwasi

Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

It looks like wws is still using select!. Otherwise LGTM!

containerd-shim-slight-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-slight-v1/src/executor.rs Outdated Show resolved Hide resolved
containerd-shim-spin-v1/src/executor.rs Outdated Show resolved Hide resolved
Signed-off-by: jiaxiao zhou <[email protected]>
@Mossaka
Copy link
Member Author

Mossaka commented Sep 1, 2023

It looks like wws is still using select!

Removed

@Mossaka Mossaka linked an issue Sep 1, 2023 that may be closed by this pull request
@Mossaka
Copy link
Member Author

Mossaka commented Sep 1, 2023

My local integraion tests passed. Hopefully the CI will pass too this time

@Mossaka
Copy link
Member Author

Mossaka commented Sep 1, 2023

Umm I am not sure why the slight test still failed... 🥲

Signed-off-by: jiaxiao zhou <[email protected]>
Signed-off-by: jiaxiao zhou <[email protected]>
@Mossaka Mossaka merged commit a7800ce into deislabs:main Sep 2, 2023
@Mossaka Mossaka deleted the update-to-newest-runwasi branch September 2, 2023 09:16
@jprendes
Copy link
Contributor

jprendes commented Sep 2, 2023

Congrats @Mossaka !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update shims to use the latest libcontainer
2 participants