Skip to content

Commit c4d5b0b

Browse files
wan9chiclaude
andcommitted
test(cache): run the remote cache e2e tests against the public cache service
`remote-cache-server` now runs the Worker from `packages/remote-cache` in workerd through Miniflare instead of the Node test backend, so the e2e tests exercise `vp run` against the real service. The wrapper proxies requests to the service. It signs an upload token for each store with a key the service fetches in place of GitHub's. It numbers the service's random blob IDs in upload order for the request log, and copies each blob to `remote-cache/blobs/<number>`, storing a changed copy on the next run so tests can still corrupt an archive. Miniflare exits on SIGINT, so the wrapper drops its listener to keep leaving Ctrl-C to the command. The only snapshot change is the request log for a fetch miss, which the service answers with a 404. The cases are skipped on musl because workerd's prebuilt binaries require glibc. The `remote_cache_backend` fixture only tested the old backend, and the service has its own protocol tests, so it's removed along with `cbor-http` and its EDN formatting. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ffec6ed commit c4d5b0b

18 files changed

Lines changed: 320 additions & 1313 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ jobs:
177177
run: pnpm --filter vite-task-tools exec playwright install-deps chromium
178178

179179
- name: Run ignored tests
180-
run: |
181-
pnpm --filter vite-task-tools test
182-
${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored
180+
run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored
183181

184182
# Windows tests are cross-compiled on a fast Linux runner with cargo-xwin
185183
# (clang-cl + lld-link against the xwin-downloaded MSVC CRT/Windows SDK)
@@ -312,9 +310,7 @@ jobs:
312310

313311
- name: Run ignored tests
314312
if: matrix.mode == 'ignored'
315-
run: |
316-
pnpm --filter vite-task-tools test
317-
cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --run-ignored ignored-only
313+
run: cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --run-ignored ignored-only
318314

319315
test-musl:
320316
needs: detect-changes
@@ -368,9 +364,7 @@ jobs:
368364
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
369365

370366
- name: Run ignored tests
371-
run: |
372-
pnpm --filter vite-task-tools test
373-
cargo test -- --ignored
367+
run: cargo test -- --ignored
374368

375369
fmt:
376370
name: Format and Check Deps

‎crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Cases that use the remote cache backend are ignored because it runs on
22
# Node.js. Windows is skipped because the PTY launcher cannot execute pnpm
3-
# command shims. Whether an upload to the backend is still running when the
4-
# tasks finish depends on timing, so steps that upload hide the message about
5-
# pending uploads. The cases that test it stall the uploads instead, with
6-
# stalled-remote-cache in front of the backend.
3+
# command shims. musl is skipped because the backend runs the public cache
4+
# service in workerd, whose prebuilt binaries require glibc. Whether an upload
5+
# to the backend is still running when the tasks finish depends on timing, so
6+
# steps that upload hide the message about pending uploads. The cases that test
7+
# it stall the uploads instead, with stalled-remote-cache in front of the
8+
# backend.
79
[[e2e]]
810
name = "read_write"
9-
cfg = "not(windows)"
11+
cfg = 'not(any(windows, target_env = "musl"))'
1012
ignore = true
1113
steps = [
1214
{ argv = [
@@ -39,7 +41,7 @@ steps = [
3941

4042
[[e2e]]
4143
name = "read"
42-
cfg = "not(windows)"
44+
cfg = 'not(any(windows, target_env = "musl"))'
4345
ignore = true
4446
steps = [
4547
{ argv = [
@@ -73,7 +75,7 @@ steps = [
7375

7476
[[e2e]]
7577
name = "restore"
76-
cfg = "not(windows)"
78+
cfg = 'not(any(windows, target_env = "musl"))'
7779
ignore = true
7880
steps = [
7981
{ argv = [
@@ -145,7 +147,7 @@ steps = [
145147

146148
[[e2e]]
147149
name = "local_and_remote_hits"
148-
cfg = "not(windows)"
150+
cfg = 'not(any(windows, target_env = "musl"))'
149151
ignore = true
150152
steps = [
151153
{ argv = [
@@ -188,7 +190,7 @@ steps = [
188190

189191
[[e2e]]
190192
name = "fallback"
191-
cfg = "not(windows)"
193+
cfg = 'not(any(windows, target_env = "musl"))'
192194
ignore = true
193195
steps = [
194196
{ argv = [
@@ -228,7 +230,7 @@ steps = [
228230

229231
[[e2e]]
230232
name = "corrupt_archive"
231-
cfg = "not(windows)"
233+
cfg = 'not(any(windows, target_env = "musl"))'
232234
ignore = true
233235
steps = [
234236
{ argv = [
@@ -280,7 +282,7 @@ steps = [
280282

281283
[[e2e]]
282284
name = "restore_failure"
283-
cfg = "not(windows)"
285+
cfg = 'not(any(windows, target_env = "musl"))'
284286
ignore = true
285287
steps = [
286288
{ argv = [
@@ -349,7 +351,7 @@ steps = [
349351

350352
[[e2e]]
351353
name = "pending_uploads"
352-
cfg = "not(windows)"
354+
cfg = 'not(any(windows, target_env = "musl"))'
353355
ignore = true
354356
steps = [
355357
{ argv = [
@@ -562,7 +564,7 @@ steps = [
562564

563565
[[e2e]]
564566
name = "ctrl_c_during_upload"
565-
cfg = "not(windows)"
567+
cfg = 'not(any(windows, target_env = "musl"))'
566568
ignore = true
567569
steps = [
568570
{ argv = [
@@ -597,7 +599,7 @@ steps = [
597599

598600
[[e2e]]
599601
name = "fast_fail_during_upload"
600-
cfg = "not(windows)"
602+
cfg = 'not(any(windows, target_env = "musl"))'
601603
ignore = true
602604
steps = [
603605
{ argv = [
@@ -622,7 +624,7 @@ steps = [
622624

623625
[[e2e]]
624626
name = "hide_pending_uploads"
625-
cfg = "not(windows)"
627+
cfg = 'not(any(windows, target_env = "musl"))'
626628
ignore = true
627629
steps = [
628630
{ argv = [

‎crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache_backend/package.json‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)