Stream: git-wasmtime

Topic: wasmtime / PR #13340 [ci] Optimizations to reduce critica...


view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit opened PR #13340 from tschneidereit:ci-opts to bytecodealliance:main:

This commit introduces three different optimizations:

  1. only run cargo check [..] with MSRV instead of the whole test suite, based on the assumption that all possible failures would be identified statically
  2. Reduce work done for MPK builds
  3. shard the wasmtime-cli job into three buckets to run in parallel, at the cost of rebuilding the binaries multiple times

We'll see how kind the real world is to the theoretical analysis here.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit added the label enhancement on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit added the label performance on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit added the label ci on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit requested alexcrichton for a review on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 16:38):

tschneidereit requested wasmtime-default-reviewers for a review on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 17:01):

tschneidereit updated PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:40):

:thumbs_up: fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:40):

:speech_balloon: fitzgen created PR review comment:

I don't think we need to preserve the historical context of the old job that this replaces as comments here.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:40):

:speech_balloon: fitzgen created PR review comment:

We could also split out the logic for checking whether mpk is available to like wasmtime-internal-core or something so that we could build a binary that exits 0/1 in minimal time but still ensure that this check in CI never differs from the check we use in wasmtime itself at some point in the future.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:50):

:speech_balloon: tschneidereit created PR review comment:

fair enough, yeah. I had to convince myself that this is indeed an okay thing to do, but should've pared it back once I was done with that.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:50):

:memo: tschneidereit submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:50):

:memo: tschneidereit submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:50):

:speech_balloon: tschneidereit created PR review comment:

so a tiny crate that we use in wasmtime, and also in a test binary that doesn't have any other dependencies? That makes sense to me.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 19:52):

tschneidereit commented on PR #13340:

Will apply Nick's suggestions—probably tomorrow—but this seems to have very nice results: CI runs for PR checks went from between 14 and 17 minutes to below 10. I'll trigger a full run with the next commit to see what that looks like as well.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 20:19):

alexcrichton commented on PR #13340:

For analysis, I'd recommend putting prtest:full in the commit message and then you can get a before/after of the latest merge to main plus the timing it took in this PR

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 20:27):

tschneidereit commented on PR #13340:

Right, that's what I meant with "trigger a full run". Won't get to it today though.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 21:42):

:memo: fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 21:42):

:speech_balloon: fitzgen created PR review comment:

so a tiny crate that we use in wasmtime

FWIW, I'd reuse the existing crates/core (possibly with a new runtime feature or something) and have crates/examples/mpk_available.rs as the binary. This avoids the hassle of new crates (which requires crossing some Ts and dotting some Is) and also makes it something that isn't built unless the user really wants it.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 13:12):

tschneidereit requested wasmtime-core-reviewers for a review on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 13:12):

tschneidereit updated PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:44):

tschneidereit commented on PR #13340:

This unfortunately doesn't help with wall-clock duration for prtest:full, since that has other critical paths. But it's certainly worth it for the PR runs, so I'll merge it and look into the full runs separately.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:44):

tschneidereit added PR #13340 [ci] Optimizations to reduce critical-path length to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:47):

tschneidereit removed PR #13340 [ci] Optimizations to reduce critical-path length from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:49):

tschneidereit updated PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:50):

tschneidereit commented on PR #13340:

Just realized I forgot to push the workflow changes making use of the new MPK detection binary.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 15:50):

tschneidereit has enabled auto merge for PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 16:14):

:thumbs_up: fitzgen submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:11):

tschneidereit added PR #13340 [ci] Optimizations to reduce critical-path length to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:20):

github-actions[bot] added the label wasmtime:api on PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:37):

:check: tschneidereit merged PR #13340.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:37):

tschneidereit removed PR #13340 [ci] Optimizations to reduce critical-path length from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:42):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 18:42):

:speech_balloon: alexcrichton created PR review comment:

While I realize that Cargo has no way of splitting this up, personally I don't think this is viable to add to CI. If a new test is added to the wasmtime-cli crate it'll never get run on CI because it's not mentioned here, and we basically have no way of knowing that (it's pretty unlikely someone checks CI logs to ensure the test is being run).

I don't really know of a great answer for this otherwise. The only other thing I can think of is to move test suites around to keep the "single crate buckets" from before as still just crates. For example we could create a dedicated crate to just doing the *.wast tests and leave the all test where it is. Or... something like that.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 19:03):

:memo: fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2026 at 19:03):

:speech_balloon: fitzgen created PR review comment:

We can use cargo metadata and parse the JSON output to get all test targets for a crate.

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2026 at 13:03):

:memo: tschneidereit submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2026 at 13:03):

:speech_balloon: tschneidereit created PR review comment:

That's a very good point, yes. I added a cargo metadata based attempt to address this over here.


Last updated: Jun 01 2026 at 09:49 UTC