Skip to content

MySQL async - #72

Merged
itowlson merged 5 commits into
spinframework:mainfrom
itowlson:mysql-async
Jul 20, 2026
Merged

MySQL async#72
itowlson merged 5 commits into
spinframework:mainfrom
itowlson:mysql-async

Conversation

@itowlson

Copy link
Copy Markdown
Contributor

Fixes #71.

The first commit is updating the bindings and brought in a lot of noise - I am wondering if I should have installed an older version of componentize-go perhaps? The second commit is the actual asyncifying. This is very directly modelled on the PostgreSQL, if by "modelled" you mean "copied and pasted."

I needed to go mod tidy the MySQL example to test it. Is there a convenient way to go mod tidy all the others? (or should I do the aforementioned "go back to an older version of componentize-go" and maybe make the problem go away)

itowlson added 2 commits July 14, 2026 12:31
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson
itowlson requested review from adamreese and dicej July 14, 2026 00:37
@itowlson

Copy link
Copy Markdown
Contributor Author

Oh dear that didn't go very well. STICK TO RUST IVAN

@itowlson

Copy link
Copy Markdown
Contributor Author

The error tells me to go get github.com/spinframework/spin-go-sdk/v3/imports/spin_postgres_4_2_0_postgres. If I do that and test locally, it fails with:

../../go/pkg/mod/go.bytecodealliance.org/pkg@v0.2.2/wit/runtime/runtime.go:110:6: missing function body

Maybe I just need to revert componentize-go, because I am not sure how to rev it...!

@dicej

dicej commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks for working on this, @itowlson! The patch looks reasonable to me. I'll clone the branch and see if I can debug the build/dep issues.

@adamreese

Copy link
Copy Markdown
Contributor

I started looking into this as well and found that we have a missing package in github.com/spinframework/spin-go-sdk/exports/spin_up_http_trigger_4_0_0/wit_exports. It's referencing github.com/spinframework/spin-go-sdk/v3/exports/spin_up_http_trigger_4_0_0/export_wasi_http_0_3_0_rc_2026_03_15_handler which doesn't exist. I didn't determine if it was the root of this issue.

...and run it!

Signed-off-by: Joel Dice <joel.dice@akamai.com>
@dicej

dicej commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

The root issue (which took some digging to find) is that go.bytecodealliance.org/pkg@v0.2.2 is broken for unit testing purposes. Here's the fix: bytecodealliance/go-pkg#8

Once that merges, I'll make a new release of that project and then update this PR.

@dicej

dicej commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

I started looking into this as well and found that we have a missing package in github.com/spinframework/spin-go-sdk/exports/spin_up_http_trigger_4_0_0/wit_exports. It's referencing github.com/spinframework/spin-go-sdk/v3/exports/spin_up_http_trigger_4_0_0/export_wasi_http_0_3_0_rc_2026_03_15_handler which doesn't exist. I didn't determine if it was the root of this issue.

Yeah, that's annoying, but it's broken on main too, so not related to this issue. I'll see if I can fix it, anyway.

This adds a previously-missing implementation of the
`exports/spin_up_http_trigger_4_0_0/export_wasi_http_0_3_0_rc_2026_03_15_handler`
package to make `go` happy.

Signed-off-by: Joel Dice <joel.dice@akamai.com>
@dicej

dicej commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Just pushed a fix for the go mod tidy issue.

This includes bytecodealliance/go-pkg#8, which allows
the unit tests to run.

Signed-off-by: Joel Dice <joel.dice@akamai.com>
@dicej

dicej commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

@itowlson I think this is ready to merge if my changes look okay to you.

@itowlson
itowlson marked this pull request as ready for review July 20, 2026 20:43
@itowlson

Copy link
Copy Markdown
Contributor Author

Thanks for salvaging this!

@itowlson
itowlson merged commit 6a134cc into spinframework:main Jul 20, 2026
2 checks passed
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.

MySQL async

3 participants