From 1759f146f015e1b842229af15d2ad06275a6c423 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 13:49:14 -0400 Subject: [PATCH 1/6] chore: Upgrading TinyGo to 0.37 Signed-off-by: Lucas Fontes --- .github/workflows/component-go.yaml | 14 +++++++------- .github/workflows/templates-go.yaml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/component-go.yaml b/.github/workflows/component-go.yaml index 1312f61e..d38f57b1 100644 --- a/.github/workflows/component-go.yaml +++ b/.github/workflows/component-go.yaml @@ -4,18 +4,18 @@ on: push: branches: ["main"] paths: - - '.github/workflows/component-go.yaml' - - 'component/**' - - 'examples/component/**' + - ".github/workflows/component-go.yaml" + - "component/**" + - "examples/component/**" pull_request: branches: ["main"] paths: - - '.github/workflows/component-go.yaml' - - 'component/**' - - 'examples/component/**' + - ".github/workflows/component-go.yaml" + - "component/**" + - "examples/component/**" env: - TINYGO_VERSION: "0.36.0" + TINYGO_VERSION: "0.37.0" GOLANGCI_VERSION: "v1.64.2" WASH_VERSION: "0.37.0" WASM_TOOLS_VERSION: "1.225.0" diff --git a/.github/workflows/templates-go.yaml b/.github/workflows/templates-go.yaml index 6a0c1e3f..856dc8b6 100644 --- a/.github/workflows/templates-go.yaml +++ b/.github/workflows/templates-go.yaml @@ -13,7 +13,7 @@ on: - "templates/**" env: - TINYGO_VERSION: "0.36.0" + TINYGO_VERSION: "0.37.0" GOLANGCI_VERSION: "v1.64.2" WASH_VERSION: "0.37.0" WASM_TOOLS_VERSION: "1.225.0" From 541a19a355d52820348ca49e03dfc9ff0f59c25a Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 13:59:31 -0400 Subject: [PATCH 2/6] Bumping to Go 1.24 Signed-off-by: Lucas Fontes --- examples/component/sqldb-postgres-query/go.mod | 2 +- examples/component/sqldb-postgres-query/test-harness/go.mod | 4 ++-- examples/provider/http-server/go.mod | 4 ++-- examples/provider/keyvalue-inmemory/go.mod | 4 ++-- examples/wasmbus/wasmcloud-rpc/go.mod | 2 +- provider/go.mod | 4 ++-- x/wasitel/go.mod | 2 +- x/wasitel/go.sum | 4 ++-- x/wasmbus/go.mod | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/component/sqldb-postgres-query/go.mod b/examples/component/sqldb-postgres-query/go.mod index d0e4d90b..6b23ba9f 100644 --- a/examples/component/sqldb-postgres-query/go.mod +++ b/examples/component/sqldb-postgres-query/go.mod @@ -2,7 +2,7 @@ module sqldb-postgres-query go 1.24 -toolchain go1.24.0 +toolchain go1.24.1 require ( github.com/stretchr/testify v1.10.0 diff --git a/examples/component/sqldb-postgres-query/test-harness/go.mod b/examples/component/sqldb-postgres-query/test-harness/go.mod index 0f32fa87..def7933f 100644 --- a/examples/component/sqldb-postgres-query/test-harness/go.mod +++ b/examples/component/sqldb-postgres-query/test-harness/go.mod @@ -1,8 +1,8 @@ module test-harness -go 1.23.0 +go 1.24 -toolchain go1.23.6 +toolchain go1.24.1 require ( go.bytecodealliance.org v0.5.0 diff --git a/examples/provider/http-server/go.mod b/examples/provider/http-server/go.mod index 34c91304..01fbc3bf 100644 --- a/examples/provider/http-server/go.mod +++ b/examples/provider/http-server/go.mod @@ -1,8 +1,8 @@ module github.com/wasmCloud/go/examples/provider/http-server -go 1.23.0 +go 1.24 -toolchain go1.23.6 +toolchain go1.24.1 replace go.wasmcloud.dev/provider => ../../../provider diff --git a/examples/provider/keyvalue-inmemory/go.mod b/examples/provider/keyvalue-inmemory/go.mod index 537332dc..0610be6c 100644 --- a/examples/provider/keyvalue-inmemory/go.mod +++ b/examples/provider/keyvalue-inmemory/go.mod @@ -1,8 +1,8 @@ module github.com/wasmCloud/go/examples/provider/keyvalue-inmemory -go 1.23.0 +go 1.24 -toolchain go1.23.6 +toolchain go1.24.1 replace go.wasmcloud.dev/provider => ../../../provider diff --git a/examples/wasmbus/wasmcloud-rpc/go.mod b/examples/wasmbus/wasmcloud-rpc/go.mod index 87a23772..e66bcbb8 100644 --- a/examples/wasmbus/wasmcloud-rpc/go.mod +++ b/examples/wasmbus/wasmcloud-rpc/go.mod @@ -1,6 +1,6 @@ module wasmcloud-rpc -go 1.23.3 +go 1.24 require ( github.com/charmbracelet/lipgloss v1.1.0 diff --git a/provider/go.mod b/provider/go.mod index ebe75f64..e5b47233 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -1,8 +1,8 @@ module go.wasmcloud.dev/provider -go 1.23.0 +go 1.24 -toolchain go1.23.6 +toolchain go1.24.1 require ( github.com/nats-io/nats.go v1.40.1 diff --git a/x/wasitel/go.mod b/x/wasitel/go.mod index a0ec7e82..53ff6ad6 100644 --- a/x/wasitel/go.mod +++ b/x/wasitel/go.mod @@ -1,6 +1,6 @@ module go.wasmcloud.dev/x/wasitel -go 1.23.2 +go 1.24 require ( go.opentelemetry.io/otel v1.34.0 diff --git a/x/wasitel/go.sum b/x/wasitel/go.sum index b8cc0490..d1c19cda 100644 --- a/x/wasitel/go.sum +++ b/x/wasitel/go.sum @@ -31,8 +31,8 @@ go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.wasmcloud.dev/component v0.0.5 h1:z9+fq1CJKm/yom33ctd5wfo8TVunm5IaI7EJdY2i9hk= -go.wasmcloud.dev/component v0.0.5/go.mod h1:PvVHQ7Xp8D9kZnVB3fm8lqWAcC6Yxd7CI/snXZUAG8E= +go.wasmcloud.dev/component v0.0.6 h1:DjM71smlK8rJWUTYeG/HxlDYwsN3sWnvIfA74GRmUNg= +go.wasmcloud.dev/component v0.0.6/go.mod h1:Ww1oCrzFXk/QSlE7X/vJRI7rF3bmhCc/Usp7Isf8Atw= golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/x/wasmbus/go.mod b/x/wasmbus/go.mod index f416c013..bfa5de86 100644 --- a/x/wasmbus/go.mod +++ b/x/wasmbus/go.mod @@ -1,6 +1,6 @@ module go.wasmcloud.dev/x/wasmbus -go 1.23.3 +go 1.24 require ( github.com/cloudevents/sdk-go/v2 v2.16.0 From d7ca54ffaadad60ebb867584f8edb0704669931b Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 14:03:06 -0400 Subject: [PATCH 3/6] lint for provider Signed-off-by: Lucas Fontes --- .github/workflows/provider-go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/provider-go.yaml b/.github/workflows/provider-go.yaml index ad78c102..cb7a9f07 100644 --- a/.github/workflows/provider-go.yaml +++ b/.github/workflows/provider-go.yaml @@ -15,7 +15,7 @@ on: - 'examples/provider/**' env: - GOLANGCI_VERSION: "v1.61" + GOLANGCI_VERSION: "v1.64.2" permissions: contents: read From d74724a5efcd5d4079990093a7aef4d24dda426e Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 14:04:27 -0400 Subject: [PATCH 4/6] more lint Signed-off-by: Lucas Fontes --- .github/workflows/wasmbus-go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wasmbus-go.yaml b/.github/workflows/wasmbus-go.yaml index 85a1d252..fbe0f42e 100644 --- a/.github/workflows/wasmbus-go.yaml +++ b/.github/workflows/wasmbus-go.yaml @@ -13,7 +13,7 @@ on: - "x/wasmbus/**" env: - GOLANGCI_VERSION: "v1.61" + GOLANGCI_VERSION: "v1.64.2" WASH_VERSION: "0.37.0" permissions: From 3a87b0f595578dbf59d0a7a2381bc3e31b845cf2 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 14:18:35 -0400 Subject: [PATCH 5/6] rolling back tinygo 0.36 from examples Signed-off-by: Lucas Fontes --- .github/workflows/component-go.yaml | 3 ++- examples/component/wasitel-http/go.mod | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/component-go.yaml b/.github/workflows/component-go.yaml index d38f57b1..8003dcaa 100644 --- a/.github/workflows/component-go.yaml +++ b/.github/workflows/component-go.yaml @@ -15,7 +15,7 @@ on: - "examples/component/**" env: - TINYGO_VERSION: "0.37.0" + TINYGO_VERSION: "0.36.0" GOLANGCI_VERSION: "v1.64.2" WASH_VERSION: "0.37.0" WASM_TOOLS_VERSION: "1.225.0" @@ -88,6 +88,7 @@ jobs: - http-password-checker - invoke - sqldb-postgres-query + - wasitel-http runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/examples/component/wasitel-http/go.mod b/examples/component/wasitel-http/go.mod index 1bc1bb52..f23571ad 100644 --- a/examples/component/wasitel-http/go.mod +++ b/examples/component/wasitel-http/go.mod @@ -34,3 +34,6 @@ require ( ) tool go.bytecodealliance.org/cmd/wit-bindgen-go + +// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository +replace go.wasmcloud.dev/component => ../../../component From a57afe5a6909bcabf0b155ad138b637252ed9855 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 9 Apr 2025 14:21:35 -0400 Subject: [PATCH 6/6] addressing lint Signed-off-by: Lucas Fontes --- examples/component/wasitel-http/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/component/wasitel-http/main.go b/examples/component/wasitel-http/main.go index dd784381..951102f2 100644 --- a/examples/component/wasitel-http/main.go +++ b/examples/component/wasitel-http/main.go @@ -24,8 +24,12 @@ func init() { } func echoHandler(w http.ResponseWriter, r *http.Request) { + if err := setupOTelSDK(); err != nil { + http.Error(w, "failed setting up otel", http.StatusInternalServerError) + return + } + ctx := r.Context() - setupOTelSDK() _, span := tracer.Start(ctx, serviceName) defer span.End()