Skip to content

Commit bae1642

Browse files
committed
fix(ci): bump rust-target cache volume to unstick the plugin runtime
The wasm32-wasip2 fix (20368ff) didn't take: the Pets E2E run on that exact commit still failed with the identical "this server was built without the plugin runtime" 500. build.rs's build_plugin_runtime() only declares `rerun-if-changed` on plugin-runtime/{src,wit} and the ATOMICSERVER_SKIP_PLUGIN_RUNTIME env var — nothing tells cargo that "the wasm32-wasip2 target just became installed" should invalidate its build-script fingerprint. Every prior CI run had already cached an empty embedded runtime (from before that target existed) in the rust-target-v3 volume, so cargo kept trusting that stale fingerprint and never re-ran the nested wasm32-wasip2 build to notice the target was now there. This is the same class of staleness bug TOUCH_WORKSPACE_SOURCES already documents fixing twice before (the -v2 and -v3 renames on this same volume, for the same "cached artifact looks newer than fresh sources" reason) — same fix, one more rename to force a clean re-evaluation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KkL48idFqkuYw8n7KdH6Dj
1 parent 6acc3fa commit bae1642

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.dagger/src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,17 @@ export class AtomicServer {
11621162
)
11631163
.withDirectory('/code/atomic-plugin', source.directory('atomic-plugin'))
11641164
.withDirectory('/code/tools', source.directory('tools'))
1165-
.withMountedCache('/code/target', dag.cacheVolume('rust-target-v3'))
1165+
// v3 -> v4: `atomic-server`'s build.rs only declares
1166+
// `rerun-if-changed` on `plugin-runtime/{src,wit}` and
1167+
// `ATOMICSERVER_SKIP_PLUGIN_RUNTIME` — it has no way to know "the
1168+
// wasm32-wasip2 target just became installed". Adding the `rustup
1169+
// target add` step above changed the container, but every prior CI
1170+
// run had already fingerprinted build.rs's output (an empty embedded
1171+
// runtime, from before that target existed) into this cache volume,
1172+
// so cargo kept trusting the stale fingerprint and never re-ran
1173+
// build_plugin_runtime() to notice the target was now there. Bumping
1174+
// the volume forces one full rebuild that actually re-evaluates it.
1175+
.withMountedCache('/code/target', dag.cacheVolume('rust-target-v4'))
11661176
.withExec(TOUCH_WORKSPACE_SOURCES)
11671177
.withWorkdir('/code')
11681178
.withExec(['cargo', 'fetch']);

0 commit comments

Comments
 (0)