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

refactor can_handle function to containerd-shim-wasm #292

Closed
dierbei opened this issue Sep 2, 2023 · 0 comments · Fixed by #293
Closed

refactor can_handle function to containerd-shim-wasm #292

dierbei opened this issue Sep 2, 2023 · 0 comments · Fixed by #293

Comments

@dierbei
Copy link
Contributor

dierbei commented Sep 2, 2023

Based on @Mossaka suggestion, can_handle function appears to duplicate the code several times.

We were able to move this function into container-shim-wasm.

The function is used in all of the following places and has the same functionality:

fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> {
match can_handle(spec) {
Ok(()) => {

fn validate(&self, spec: &Spec) -> std::result::Result<(), ExecutorValidationError> {
match can_handle(spec) {
Ok(()) => Ok(()),

fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> {
match can_handle(spec) {
Ok(()) => {

fn validate(&self, spec: &Spec) -> std::result::Result<(), ExecutorValidationError> {
match can_handle(spec) {
Ok(()) => Ok(()),

We might be able to move him to the crates/containerd-shim-wasm/src/exector_util.rs file.

@Mossaka Mossaka linked a pull request Sep 5, 2023 that will close this issue
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 a pull request may close this issue.

1 participant