Skip to content

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jun 30, 2025

Switch from async-std to tokio runtime and maintain rough test execution time while simplifying the async implementation.

This builds on some of the simplifying work that went in to #2173, but aborts on the use of rayon because of the mutex contention issues that involved. It doesn't make all of the async complexity go away, we use tokio::task::spawn_blocking to run the tasks and use buffer_unordered to control our concurrency, but we don't lose as much code as #2173 did (+148 −641 vs +166 −460 and the whole TEST_VECTOR_PARALLELISM thing still exists here).

@rvagg rvagg requested a review from Copilot June 30, 2025 05:35
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Jun 30, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the conformance test runner from the async-std runtime to Tokio’s multi-threaded runtime and simplifies the async flow by using tokio::task::spawn_blocking and futures::stream for concurrency control. It also converts the run_vector function to a synchronous API, updates test vector parsing, and adjusts dependencies accordingly.

  • Swap out async-std for Tokio and use buffer_unordered for parallel test execution
  • Refactor run_vector to return results synchronously and launch it via spawn_blocking
  • Update dependency manifests to remove async-std and add Tokio

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testing/conformance/tests/runner.rs Replaced async-std with Tokio, refactored vector runner
testing/conformance/src/vector.rs Made seed_blockstore synchronous
testing/conformance/src/lib.rs Extended report! macro to include failure reasons
testing/conformance/src/actors.rs Simplified load_bundles by removing intermediate buffer
testing/conformance/benches/bench_drivers.rs Updated bench to call sync seed_blockstore
testing/conformance/Cargo.toml Removed async-std, moved futures and added tokio
Comments suppressed due to low confidence (2)

testing/conformance/Cargo.toml:24

  • The futures crate was removed from [dependencies] but is still used in runner.rs. Please re-add futures = "0.3.31" to [dependencies] so that the production code compiles.
wasmtime = { workspace = true }

testing/conformance/tests/runner.rs:177

  • The doc comment still refers to returning a list of VectorResults but the function now returns a (PathBuf, Vec<VariantResult>) tuple. Please update the comment to match the new signature.
/// Runs a single test vector and returns a list of VectorResults,

@rvagg
Copy link
Member Author

rvagg commented Jun 30, 2025

Would close #2144 when ported to v4

Copy link
Contributor

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Jun 30, 2025
Switch from async-std to tokio runtime and maintain rough test execution time
while simplifying the async implementation.

Ref: #2173
@rvagg rvagg force-pushed the rvagg/tokio-conformance branch from 0090c1c to 15fdfa8 Compare June 30, 2025 10:21
@rvagg rvagg merged commit af342ae into release/v3 Jul 7, 2025
10 checks passed
@rvagg rvagg deleted the rvagg/tokio-conformance branch July 7, 2025 05:43
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

4 participants