From eac553576d23bad6a041e7fddda2b46e54091515 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Mon, 15 Jan 2024 18:45:09 +0100 Subject: [PATCH] feat: disable wasm cache in pipeline, to improve stability --- .github/workflows/go_test.yml | 2 ++ internal/phplint/wasm.go | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index 693086a5..75e8e630 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -11,6 +11,8 @@ on: jobs: build: name: ${{ matrix.os }} + env: + SHOPWARE_CLI_DISABLE_WASM_CACHE: 1 strategy: fail-fast: false matrix: diff --git a/internal/phplint/wasm.go b/internal/phplint/wasm.go index 1ec856ce..6766acab 100644 --- a/internal/phplint/wasm.go +++ b/internal/phplint/wasm.go @@ -24,7 +24,13 @@ func getWazeroRuntime(ctx context.Context) (wazero.Runtime, error) { return nil, err } - r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfig().WithCompilationCache(cache)) + runtimeConfig := wazero.NewRuntimeConfig() + + if os.Getenv("SHOPWARE_CLI_DISABLE_WASM_CACHE") != "1" { + runtimeConfig = runtimeConfig.WithCompilationCache(cache) + } + + r := wazero.NewRuntimeWithConfig(ctx, runtimeConfig) wasi_snapshot_preview1.MustInstantiate(ctx, r)