You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2023/02/20 17:21:56 UTC
[beam] 02/06: Bump github.com/tetratelabs/wazero from 1.0.0-pre.7 to 1.0.0-pre.9 in /sdks (#25560)
This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch tinyLintFixes
in repository https://gitbox.apache.org/repos/asf/beam.git
commit 18bd22bdb95d829c0a53a489925e5750ea0a530b
Author: Damon <da...@users.noreply.github.com>
AuthorDate: Sun Feb 19 22:27:11 2023 -0800
Bump github.com/tetratelabs/wazero from 1.0.0-pre.7 to 1.0.0-pre.9 in /sdks (#25560)
* go get -u github.com/tetratelabs/wazero
* Update README.md
---
sdks/go.mod | 4 ++--
sdks/go.sum | 4 +++-
sdks/go/examples/wasm/README.md | 6 +++---
sdks/go/examples/wasm/wasm.go | 6 +++---
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/sdks/go.mod b/sdks/go.mod
index cd246981352..33623ef50bd 100644
--- a/sdks/go.mod
+++ b/sdks/go.mod
@@ -48,7 +48,7 @@ require (
github.com/proullon/ramsql v0.0.0-20211120092837-c8d0a408b939
github.com/spf13/cobra v1.6.1
github.com/testcontainers/testcontainers-go v0.15.0
- github.com/tetratelabs/wazero v1.0.0-pre.7
+ github.com/tetratelabs/wazero v1.0.0-pre.9
github.com/xitongsys/parquet-go v1.6.2
github.com/xitongsys/parquet-go-source v0.0.0-20220315005136-aec0fe3e777c
go.mongodb.org/mongo-driver v1.11.1
@@ -138,4 +138,4 @@ require (
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/linkedin/goavro.v1 v1.0.5 // indirect
-)
\ No newline at end of file
+)
diff --git a/sdks/go.sum b/sdks/go.sum
index cb2dfed1ee9..74f2dd3909f 100644
--- a/sdks/go.sum
+++ b/sdks/go.sum
@@ -822,6 +822,8 @@ github.com/testcontainers/testcontainers-go v0.15.0 h1:3Ex7PUGFv0b2bBsdOv6R42+SK
github.com/testcontainers/testcontainers-go v0.15.0/go.mod h1:PkohMRH2X8Hib0IWtifVexDfLPVT+tb5E9hsf7cW12w=
github.com/tetratelabs/wazero v1.0.0-pre.7 h1:WI5N14XxoXw+ZWhcjSazJ6rEowhJbH/x8hglxC5gN7k=
github.com/tetratelabs/wazero v1.0.0-pre.7/go.mod h1:u8wrFmpdrykiFK0DFPiFm5a4+0RzsdmXYVtijBKqUVo=
+github.com/tetratelabs/wazero v1.0.0-pre.9 h1:2uVdi2bvTi/JQxG2cp3LRm2aRadd3nURn5jcfbvqZcw=
+github.com/tetratelabs/wazero v1.0.0-pre.9/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
@@ -1326,4 +1328,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
-sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
\ No newline at end of file
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/sdks/go/examples/wasm/README.md b/sdks/go/examples/wasm/README.md
index ad25ce87771..e75f0895a53 100644
--- a/sdks/go/examples/wasm/README.md
+++ b/sdks/go/examples/wasm/README.md
@@ -33,9 +33,9 @@ BEAM_HOME=$(pwd)/beam
cd $BEAM_HOME/sdks
```
-## Direct Runner execution
+## Local Runner execution
-To execute this example on the direct runner:
+To execute this example on the local runner:
```shell
go run ./go/examples/wasm --output=$OUTPUT
@@ -134,4 +134,4 @@ SUBNETWORK=regions/$REGION/subnetworks/<subnetwork>
cd $BEAM_HOME/sdks
go run ./go/examples/wasm --runner=dataflow --output=$OUTPUT --environment_config=apache/beam_go_sdk:latest \
--project=$PROJECT --region=$REGION --network=$NETWORK --subnetwork=$SUBNETWORK --staging_location=$STAGING
-```
\ No newline at end of file
+```
diff --git a/sdks/go/examples/wasm/wasm.go b/sdks/go/examples/wasm/wasm.go
index 3d51d55bb57..71cec3095f3 100644
--- a/sdks/go/examples/wasm/wasm.go
+++ b/sdks/go/examples/wasm/wasm.go
@@ -81,7 +81,7 @@ func main() {
func run(ctx context.Context) error {
p, s := beam.NewPipelineWithRoot()
- in := beam.Create(s, "Ada", "Lovelace", "World", "Beam", "Senior López")
+ in := beam.Create(s, "Ada", "Lovelace", "World", "Beam", "Senior López", "Random unicorn emoji 🦄")
out := beam.ParDo(s, &embeddedWasmFn{}, in)
@@ -115,14 +115,14 @@ func (fn *embeddedWasmFn) Setup(ctx context.Context) error {
// log to the console.
_, err := fn.r.NewHostModuleBuilder("env").
NewFunctionBuilder().WithFunc(logString).Export("log").
- Instantiate(ctx, fn.r)
+ Instantiate(ctx)
if err != nil {
return fmt.Errorf("failed to instantiate host module: %w", err)
}
// Instantiate a WebAssembly module that imports the "log" function defined
// in "env" and exports "memory" and functions we'll use in this example.
- fn.mod, err = fn.r.InstantiateModuleFromBinary(ctx, greetWasm)
+ fn.mod, err = fn.r.Instantiate(ctx, greetWasm)
if err != nil {
return fmt.Errorf("failed to instantiate wasm module: %v", err)
}