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

ci: Enable the wasm-wasi-component tests #1402

Merged
merged 4 commits into from
Aug 28, 2024
Merged

Conversation

ac000
Copy link
Member

@ac000 ac000 commented Aug 26, 2024

We now have tests for this module via commit cad6aed ("Tests: initial "wasm-wasi-component" test").

@ac000 ac000 force-pushed the ci-wasm-wc branch 18 times, most recently from bbaf046 to 8f65fae Compare August 27, 2024 14:58
@ac000 ac000 marked this pull request as ready for review August 27, 2024 15:06
@ac000 ac000 requested a review from avahahn August 27, 2024 15:07
@ac000 ac000 added this to the 1.33 milestone Aug 27, 2024
@ac000
Copy link
Member Author

ac000 commented Aug 27, 2024

It would be good to merge in before the fix for #1392

@ac000 ac000 mentioned this pull request Aug 28, 2024
6 tasks
Copy link
Contributor

@avahahn avahahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

We can now get list objects from the /status endpoint in the case of
having different versions of the same language module.

That led to this error

  >       return d1 - d2
  E       TypeError: unsupported operand type(s) for -: 'list' and 'list'

We already cover a similar case for when we have simple strings so add
this to that.

Signed-off-by: Andrew Clayton <[email protected]>
Changes are afoot... wasm32-wasi has been renamed wasm32-wasip1, there
is also a wasm32-wasip2 (seems not yet fully realised) and wasm32-wasi
is being kept clear for an eventual WASI 1.0 release.

cargo-component targets wasm32-wasip1 by default and adapts the module
to the preview2 version of WASI supported by the component model.

This means that the component is now found under
target/wasm32-wasip1/...

Link: <https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip1.html>
Link: <https://github.com/bytecodealliance/cargo-component/blob/main/README.md#wasi-support>
Signed-off-by: Andrew Clayton <[email protected]>
Rename this to 'test_wasm-wasi-component.py' to match the language
module name and the name as used in the CI.

Signed-off-by: Andrew Clayton <[email protected]>
We now have tests for this module via commit cad6aed ("Tests: initial
"wasm-wasi-component" test").

We need to install cargo-component for this test target.

Also the only way I found I could get this test to run was by running as
non-root. The issue I was seeing was that despite cargo being installed
into /home/runner/.cargo/bin *and* that being in the path, it kept
claiming it couldn't find cargo. E.g.

  $ sudo -E echo $PATH

Showed /home/runner/.cargo/bin in there.

  $ sudo -E /home/runner/.cargo/bin/cargo -V

Worked.

  $ sudo -E cargo -V

cargo command not found.

(Also other oddities, despite claiming to be using bash, it couldn't
find shell builtins like 'hash' and 'export', perhaps some Ubuntu
weirdness...)

However, no problem, there is *no* need for it run as root anyway so
result!

Signed-off-by: Andrew Clayton <[email protected]>
@ac000
Copy link
Member Author

ac000 commented Aug 28, 2024

Rebase with master

$ git range-diff 8f65fae6...337cba43
 -:  -------- >  1:  1a685084 Docker: bump Go versions
 -:  -------- >  2:  5b47542e Docker: update Rust version
 -:  -------- >  3:  8eb5d128 Docker: introduce "slim" python images
 -:  -------- >  4:  4778099b Docker: leave artifacts when build targets succeed
 -:  -------- >  5:  6e3152c0 Remove .hgtags
 -:  -------- >  6:  778d81cc Remove .hgignore files
 -:  -------- >  7:  0951778d Added .gitignore for pkg/contrib/tarballs
 -:  -------- >  8:  f4298f94 tests: Fix `/status' endpoint to cater for lists
 1:  f3351bce =  9:  264f4af4 test/wasm-wc: Target wasm32-wasip1
 2:  4b361215 = 10:  19cd88ef test/wasm-wc: Rename test_wasm_component.py
 3:  8f65fae6 = 11:  337cba43 ci: Enable the wasm-wasi-component tests

@ac000 ac000 merged commit 337cba4 into nginx:master Aug 28, 2024
23 checks passed
@ac000 ac000 deleted the ci-wasm-wc branch August 28, 2024 21:20
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

Successfully merging this pull request may close these issues.

2 participants