diff --git a/data/extension/init/templates/tinygo/envoy.filters.http/default/go.sum b/data/extension/init/templates/tinygo/envoy.filters.http/default/go.sum index cd67c2a8..41ee81c7 100644 --- a/data/extension/init/templates/tinygo/envoy.filters.http/default/go.sum +++ b/data/extension/init/templates/tinygo/envoy.filters.http/default/go.sum @@ -5,9 +5,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tetratelabs/proxy-wasm-go-sdk v0.0.1 h1:HMaVuxBYaqqPF324hbxg10OB8feQQwFU6EWlzh6LW8M= -github.com/tetratelabs/proxy-wasm-go-sdk v0.0.1/go.mod h1:oriMCq3KvyEkgWVKr5B9DauvzpQ4Qy5eb32hxPa83Dw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/tetratelabs/proxy-wasm-go-sdk v0.0.4 h1:8IiY8UrCmoVNwki7mak7EjrUpNq/RtklNvKMF5kxWs8= +github.com/tetratelabs/proxy-wasm-go-sdk v0.0.4/go.mod h1:y1ZQT4bQEBnR8Do4nSOzb3roczzPvcAp8UrF6NEYWNY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/data/extension/init/templates/tinygo/envoy.filters.network/default/go.sum b/data/extension/init/templates/tinygo/envoy.filters.network/default/go.sum new file mode 100644 index 00000000..41ee81c7 --- /dev/null +++ b/data/extension/init/templates/tinygo/envoy.filters.network/default/go.sum @@ -0,0 +1,12 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tetratelabs/proxy-wasm-go-sdk v0.0.4 h1:8IiY8UrCmoVNwki7mak7EjrUpNq/RtklNvKMF5kxWs8= +github.com/tetratelabs/proxy-wasm-go-sdk v0.0.4/go.mod h1:y1ZQT4bQEBnR8Do4nSOzb3roczzPvcAp8UrF6NEYWNY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.mod b/go.mod index fbf93e5a..106449e3 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/tetratelabs/getenvoy-package v0.0.0-20190730071641-da31aed4333e github.com/tetratelabs/log v0.0.0-20190710134534-eb04d1e84fb8 github.com/tetratelabs/multierror v1.1.0 - github.com/tetratelabs/proxy-wasm-go-sdk v0.0.2 // indirect gotest.tools v2.2.0+incompatible istio.io/api v0.0.0-20200227213531-891bf31f3c32 istio.io/istio v0.0.0-20200304114959-c3c353285578 diff --git a/go.sum b/go.sum index e73eaf94..6b439690 100644 --- a/go.sum +++ b/go.sum @@ -653,8 +653,6 @@ github.com/tetratelabs/log v0.0.0-20190710134534-eb04d1e84fb8 h1:a7FN/XPymdzttMa github.com/tetratelabs/log v0.0.0-20190710134534-eb04d1e84fb8/go.mod h1:w+dEBsxcYEFg0I6whrgkMzjD8GBBQgmDq9hykB30pt8= github.com/tetratelabs/multierror v1.1.0 h1:cKmV/Pbf42K5wp8glxa2YIausbxIraPN8fzru9Pn1Cg= github.com/tetratelabs/multierror v1.1.0/go.mod h1:kH3SzI/z+FwEbV9bxQDx4GiIgE2djuyb8wiB2DaUBnY= -github.com/tetratelabs/proxy-wasm-go-sdk v0.0.2 h1:nJVDdX6v/Mn0IbiogBv4cJvil4mHmBubML+3KZIWe/A= -github.com/tetratelabs/proxy-wasm-go-sdk v0.0.2/go.mod h1:oriMCq3KvyEkgWVKr5B9DauvzpQ4Qy5eb32hxPa83Dw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= diff --git a/images/extension-builders/tinygo/Dockerfile b/images/extension-builders/tinygo/Dockerfile index 7d22bd26..744a3cce 100644 --- a/images/extension-builders/tinygo/Dockerfile +++ b/images/extension-builders/tinygo/Dockerfile @@ -18,21 +18,15 @@ FROM golang:1.15 -ENV TINYGO_VERSION=0.15.0 - -RUN wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_amd64.deb -RUN dpkg -i tinygo_${TINYGO_VERSION}_amd64.deb && rm tinygo_${TINYGO_VERSION}_amd64.deb +# TODO: use 1.6.0 release package after the WASI supported is released +# this corresponds to https://github.com/tinygo-org/tinygo/commit/f50ad3585d084b17f7754f4b3cb0d42661fee036 +RUN wget https://19227-136505169-gh.circle-artifacts.com/0/tmp/tinygo_amd64.deb +RUN dpkg -i tinygo_amd64.deb && rm tinygo_amd64.deb ENV GOCACHE=/source/.gocache ENV GOMODCACHE=/source/.gomodcache ENV XDG_CACHE_HOME=/source/.cache -ENV TINYGO_SDK_NAME=github.com/tetratelabs/proxy-wasm-go-sdk -ENV TINYGO_SDK_VERSION=v0.0.2 -ENV TINYGO_SDK_PATH=${GOMODCACHE}/${TINYGO_SDK_NAME}@${TINYGO_SDK_VERSION} - -RUN mkdir -p ${TINYGO_SDK_PATH} && git clone https://${TINYGO_SDK_NAME} -b ${TINYGO_SDK_VERSION} ${TINYGO_SDK_PATH} - COPY ./entrypoint.sh /usr/local/getenvoy/extension/builder/entrypoint.sh COPY ./tinygo/commands.sh /usr/local/getenvoy/extension/builder/commands.sh ENTRYPOINT ["/usr/local/getenvoy/extension/builder/entrypoint.sh"] diff --git a/images/extension-builders/tinygo/commands.sh b/images/extension-builders/tinygo/commands.sh index 9ec9c99b..5c2f3fcb 100755 --- a/images/extension-builders/tinygo/commands.sh +++ b/images/extension-builders/tinygo/commands.sh @@ -14,14 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -######################################################################### -# Build Wasm extension and copy *.wasm file to a given location. -# Globals: -# CARGO_TARGET_DIR -# GETENVOY_WORKSPACE_DIR -# Arguments: -# Path relative to the workspace root to copy *.wasm file to. -######################################################################### extension_build() { exec tinygo build -o "$1" -wasm-abi=generic -target wasm main.go } diff --git a/pkg/extension/workspace/toolchain/builtin/default_config_test.go b/pkg/extension/workspace/toolchain/builtin/default_config_test.go index aab2f20b..3ce88c65 100644 --- a/pkg/extension/workspace/toolchain/builtin/default_config_test.go +++ b/pkg/extension/workspace/toolchain/builtin/default_config_test.go @@ -18,11 +18,10 @@ import ( "fmt" "io/ioutil" - "github.com/pkg/errors" - . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" + "github.com/pkg/errors" "github.com/tetratelabs/getenvoy/pkg/extension/workspace/config" "github.com/tetratelabs/getenvoy/pkg/extension/workspace/config/extension"