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

Timer trigger sample fails to resolve import #1662

Closed
itowlson opened this issue Jul 16, 2023 · 0 comments · Fixed by #1667
Closed

Timer trigger sample fails to resolve import #1662

itowlson opened this issue Jul 16, 2023 · 0 comments · Fixed by #1667
Assignees
Labels
bug Something isn't working

Comments

@itowlson
Copy link
Contributor

As part of ongoing component and Wasmtime infrastructure improvements, the examples/spin-timer trigger sample was updated in #1615 to refer to the Spin config API in a new way. Unfortunately, although both the trigger and example guest build okay, the example guest fails at spin up with:

$ spin up
Error: Failed to instantiate component 'three'

Caused by:
    0: Failed to instantiate component 'three'
    1: import `fermyon:example/config` has the wrong type
    2: instance export `get-config` has the wrong type
    3: expected func found nothing

I am not sure how to go about fixing this. @rylev @dicej do you have any ideas please? I'm not sure how to share the diff in a text format so here's ye olde GitHub screenshot:

image

The workaround is to revert the sample to an earlier commit (Spin itself doesn't need to be reverted as the trigger is an independent process).

Incidentally, this highlights a gap in CI - it tests that the sample builds, but doesn't test that it loads and runs - it would be good to improve our coverage here.

@michelleN michelleN added the bug Something isn't working label Jul 17, 2023
@dicej dicej self-assigned this Jul 17, 2023
dicej added a commit to dicej/spin that referenced this issue Jul 17, 2023
The recent `wit-bindgen` update broke this example due to changes in how WIT
represents interface and world namespaces.  Specifically, the host defines the
`config` interface under `fermyon:spin`, whereas the `spin-timer` world is
defined under `fermyon:examples`, so we need to tell WIT they're in different
packages.

Fixes fermyon#1662

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej added a commit to dicej/spin that referenced this issue Jul 17, 2023
The recent `wit-bindgen` update broke this example due to changes in how WIT
represents interface and world namespaces.  Specifically, the host defines the
`config` interface under `fermyon:spin`, whereas the `spin-timer` world is
defined under `fermyon:examples`, so we need to tell WIT they're in different
packages.

Fixes fermyon#1662

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej added a commit to dicej/spin that referenced this issue Jul 17, 2023
The recent `wit-bindgen` update broke this example due to changes in how WIT
represents interface and world namespaces.  Specifically, the host defines the
`config` interface under `fermyon:spin`, whereas the `spin-timer` world is
defined under `fermyon:examples`, so we need to tell WIT they're in different
packages.

Fixes fermyon#1662

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej added a commit that referenced this issue Jul 17, 2023
The recent `wit-bindgen` update broke this example due to changes in how WIT
represents interface and world namespaces.  Specifically, the host defines the
`config` interface under `fermyon:spin`, whereas the `spin-timer` world is
defined under `fermyon:examples`, so we need to tell WIT they're in different
packages.

Fixes #1662

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants