Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM filter example throws bazel workspace error #403

Open
salrashid123 opened this issue Dec 23, 2024 · 2 comments
Open

WASM filter example throws bazel workspace error #403

salrashid123 opened this issue Dec 23, 2024 · 2 comments

Comments

@salrashid123
Copy link

Trying to run the updated filter sample from here:

throws a bazel workspace error:

$ git clone https://github.com/envoyproxy/examples.git
$ cd examples/wasm-cc
$ export UID
$ docker compose -f docker-compose-wasm.yaml up --remove-orphans wasm_compile_update
[+] Running 1/0
 ✔ Container wasm-cc-wasm_compile_update-1  Created                                                                                                                                                0.0s 
Attaching to wasm_compile_update-1
wasm_compile_update-1  | $TEST_TMPDIR defined: output root default is '/tmp' and max_idle_secs default is '15'.
wasm_compile_update-1  | WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a MODULE.bazel file).
wasm_compile_update-1  | OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.

wasm_compile_update-1  | ERROR: The 'build' command is only supported from within a workspace (below a directory having a MODULE.bazel file).

wasm_compile_update-1  | See documentation at https://bazel.build/concepts/build-ref#workspace
wasm_compile_update-1  | bash: line 1: --repository_cache=/tmp/repository_cache: No such file or directory
wasm_compile_update-1  | bash: line 2: //examples/wasm-cc:envoy_filter_http_wasm_updated_example.wasm: No such file or directory
wasm_compile_update-1  | bash: -c: line 3: syntax error near unexpected token `&&'
wasm_compile_update-1  | bash: -c: line 3: ` && cp -a bazel-bin/examples/wasm-cc/*updated*.wasm /output'

there's probably a path error somewhere in the script (i'd submit a pr but kinda lost on bazel workspaces and how the sandbox dir structure is used or setup)

@phlax
Copy link
Member

phlax commented Dec 23, 2024

hi @salrashid123 this is tested in ci so wondering what is different to cause this syntax error - i suspect docker version or simlar - it seems to be borking on a shell script so might be a case of it using sh rather than bash somewhere

will look further when i have some time

@phlax
Copy link
Member

phlax commented Dec 23, 2024

oh wait its not tested now - we disabled it when moving the repo as it was hitting some issue - not sure if the same issue, it did use to be tested and i dont think it changed since other than being moved to the repo here

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

No branches or pull requests

2 participants