wasmCloud / wadm

wasmCloud Application Deployment Manager (wadm) is a Wasm-native orchestrator for managing and scaling declarative wasmCloud applications.
https://wasmcloud.com
Apache License 2.0
100 stars 25 forks source link

[BUG] flake due to dependency on download #353

Closed ricochet closed 1 month ago

ricochet commented 1 month ago

This is an integration test that's flaky in CI and for first-time users.

Steps to reproduce:

# clear downloads
rm -rf ~/.wash/downloads
cargo test --package wadm-cli --test command_worker_integration -- test_annotation_stop --exact --show-output

The error, if the test flakes, will be:

 ---- test_annotation_stop stdout ----
thread 'test_annotation_stop' panicked at tests/helpers.rs:120:37:
Unable to run detached wash up: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error stopping wasmcloud host: No such file or directory (os error 2)

This is from the host download taking time to download.

Where possible we should avoid downloads including in integration tests. But if we need to stage a pipeline to run more e2e style tests, then the integration tests should be staged prior to triggering them like with a setup action in CI.

ricochet commented 1 month ago

A little more research and I think this might be a good case for a wasmCloud testcontainer.

joonas commented 1 month ago

I'd be happy to take a pass at putting testcontainerizing this one, I've got some experience in working with them in other parts of the wasmcloud project, so it should be pretty manageable to transfer that over to wadm as well