containerd / runwasi

Facilitates running Wasm / WASI workloads managed by containerd
Apache License 2.0
1.02k stars 84 forks source link

chore(deps): bump wasmedge-sdk from 0.12.2 to 0.13.2 #395

Closed dependabot[bot] closed 8 months ago

dependabot[bot] commented 8 months ago

Bumps wasmedge-sdk from 0.12.2 to 0.13.0.

Changelog

Sourced from wasmedge-sdk's changelog.

[0.13.0] - 2023-11-07

⛰️ Features

  • New API PluginManager::nn_preload. This API is used to initialize the wasi_nn plug-in with given preloads (#74)

  • Implement FromStr trait for NNPreload struct (#81)

🚜 Refactor

  • [BREAKING] Update the argument types (#82):

    • VmBuilder::with_plugin
    • VmBuilder::with_plugin_wasi_nn
    • VmBuilder::with_plugin_wasi_crypto
    • VmBuilder::with_plugin_wasmedge_process
  • [BREAKING] Update the argument types (#76):

    • Executor::run_func_with_timeout and Executor::run_func_async_with_timeout
    • Vm::run_func_with_timeout and Vm::run_func_async_with_timeout
    • Func::run_with_timeout and Func::run_async_with_timeout

🐛 Bug Fixes

  • Introduce new C-API WasmEdge_FunctionInstanceGetData to fix the memory leak issue caused by host data (#84)

Ci

  • Support macos-13 and remove macos-11 from the ci-build and standalone workflows (#84)
Commits
  • a27724d [Chore] Update build script (#86)
  • e475ea7 doc: update CHANGELOG (#85)
  • c80ddb4 [refactor] Introduce WasmEdge_FunctionInstanceGetData to drop host data (#84)
  • 3146e89 [feat] Implement FromStr trait for NNPreload in wasmedge-sdk (#81)
  • 37cc270 [refactor] Improve the VmBuilder::with_plugin API (#82)
  • 07e84b7 [Refactor] update the argument type of run_func_with_timeout and `run_func_...
  • e657ea2 [Refactor] Update GraphEncoding and ExecutionTarget in `wasmedge-sdk::plu...
  • 373221d [Feat] Enable PluginManager::nn_preload (#74)
  • See full diff in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Mossaka commented 8 months ago

This error seems like the C APIs were not up-to-date with the latest wasmedge sdk. https://github.com/containerd/runwasi/actions/runs/6867767968/job/18676837552?pr=395#step:6:150

Any insights into this? @jprendes

jprendes commented 8 months ago

The error is

Error:    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmedge-sdk-0.13.1/src/executor.rs:83:58
    |
83  |             .call_func_with_timeout(&func.inner, params, timeout)
    |              ----------------------                      ^^^^^^^ expected `u64`, found `Duration`
    |              |
    |              arguments to this method are incorrect
    |

I can clearly see here that the argument is a Duration.

This argument used to be a u64 and was updated to be a Duration here.

So I am inclined to think this is a cache issue. I would have thought that the version change was enough to invalidate the cache, but maybe not?

I would suggest clearing the cache in the repo and trying again:

  Restore Key:
      v0-rust-fmt-3c943bf5
  Cache Key:
      v0-rust-fmt-3c943bf5-5aeaa2fe

and

  Restore Key:
      v0-rust-build-8af524e7
  Cache Key:
      v0-rust-build-8af524e7-5aeaa2fe
dependabot[bot] commented 8 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

jprendes commented 8 months ago

Ok, I see now. The problem is that Cargo.lock is pointing to an old wasmedge-sys, and the new wasmedge-sdk is not specific enought as what patch version of wasmedge-sys it needs.

Updating wasmedge-sys should do the trick:

cargo update -p wasmedge-sys
jprendes commented 8 months ago

With that make check-wasmedge passes, but make build-wasmedge still fails. It looks like wasmedge now has an extra dependency on zstd but it hasn't been added here.

jprendes commented 8 months ago

I can confirm that adding "zstd" to the list here fixes the build as well. That would also mean we need to install zstd in the Dockerfiles in cross/

Mossaka commented 8 months ago

Will try that! Thanks

Mossaka commented 8 months ago

Is this something wasmedge-sdk static needed to fix instead of us adding zstd to the cross Dockerfiles?

Mossaka commented 8 months ago

https://github.com/WasmEdge/wasmedge-rust-sdk/releases/tag/0.13.2 should have fixed the issue

jprendes commented 8 months ago

I think this needs to be updated to 0.13.5 https://github.com/containerd/runwasi/blob/main/scripts/setup-windows.sh#L2

jsturtevant commented 8 months ago

LGTM, nice work tracking down all the changes!

jprendes commented 8 months ago

LGTM! Thanks for working on this :-)