wasmCloud icon indicating copy to clipboard operation
wasmCloud copied to clipboard

[BUG] Blobby example, unknown "wasi:blobstore/blobstore" target

Open brianw-0 opened this issue 1 year ago • 6 comments

Affected project(s)

  • [ ] documentation
  • [X] examples
  • [ ] wasmCloud host
  • [ ] wasmCloud CLI (wash)
  • [ ] wasmCloud dashboard UI (washboard)
  • [ ] capability providers
  • [ ] provider bindgen
  • [ ] control interface client
  • [ ] other / not sure

Describe the bug

This error occurs when running the Blobby example under wasmCloud/examples/rust/components. When the blobby component receives a curl command, it attempts to check if the blobstore container exists, and instead returns the error "unknown wasi:blobstore/blobstore target"

Nothing from the example code has been modified, so the wadm.yaml, wit, and source files remain the same as in the public repo.

Steps to reproduce

  1. wash up
  2. wash app deploy wadm.yaml (from the blobby example folder)
  3. curl http://localhost:8080

Expected behavior

I expected the example code to continue executing and create the corresponding container with name "default".

Environment

  • OS: Ubuntu 22.04.1
  • Shell: bash
  • wash: 0.27.0
  • wasmcloud: 1.0.0

Screenshots / Logs / Additional context

Running the commands from the wasmCloud/examples/rust/components/blobby directory:

> wash app deploy wadm.yaml
Successfully deployed model blobby v0.0.1

> curl localhost:8080
Error when communicating with blobstore: unknown `wasi:blobstore/blobstore` target

brianw-0 avatar Apr 29 '24 04:04 brianw-0

Hey @brianw-0, I think this is a simple rename error from migrating the blobby wadm manifest 😞 The problem lies on this line: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/blobby/wadm.yaml#L24

The linkdef trait is considered a pre-1.0 link, and it should be link instead. I opened up a PR to fix this in case you'd like to try it out: https://github.com/wasmCloud/wasmCloud/pull/1997

Thank you for filing!

brooksmtownsend avatar Apr 29 '24 12:04 brooksmtownsend

I didn't consider that merging the PR would mark this as "completed", I was able to make it work with this fix but please let me know if it works for you! If it doesn't we can reopen

brooksmtownsend avatar Apr 29 '24 13:04 brooksmtownsend

Thank you for the fast response! I applied the fix but I still get a blobstore error (although slightly different this time):

Error when communicating with blobstore: function failed: failed to lookup creation date: creation time is not available on this platform currently

brianw-0 avatar Apr 29 '24 15:04 brianw-0

Woah, that's surprising. That error is coming back from the standard Rust library, so it must be an issue we need to compensate for in our blobstore provider. I suppose we could just default at 0, or the UNIX epoch, if the OS doesn't support the creation time.

edit: I filed #2005 with this fix as a strawman

Thoughts @thomastaylor312 ? Not sure if you've seen this handled in a different way.

brooksmtownsend avatar Apr 29 '24 15:04 brooksmtownsend

Honestly I think that fix will work just fine

thomastaylor312 avatar Apr 30 '24 18:04 thomastaylor312

Alrighty @brianw-0 , if you wouldn't mind trying with ghcr.io/wasmcloud/blobstore-fs:0.6.1 that should fix the creation time issue 😄 One more bug squashed

brooksmtownsend avatar May 01 '24 15:05 brooksmtownsend

@brianw-0 just checking in here, did this help with the problem? Just want to make sure that the blobstore call went all the way through 🙂

brooksmtownsend avatar May 20 '24 19:05 brooksmtownsend

Sorry for the late response - yes, it appears that the errors are gone. Thank you for your help!

brianw-0 avatar May 25 '24 17:05 brianw-0