diff --git a/infra/k8s/argo/train-template.yaml b/infra/k8s/argo/train-template.yaml index 6f1e4fd56..4fcd1c46a 100644 --- a/infra/k8s/argo/train-template.yaml +++ b/infra/k8s/argo/train-template.yaml @@ -166,12 +166,21 @@ spec: # pods and commits (cargo's incremental cache is invalidated by # git checkout mtime touches — sccache is content-hash keyed so it # isn't). Binary assumed present in ci-builder image. + # + # CARGO_INCREMENTAL=0 is required to make sccache effective: + # the project's Cargo.toml / .cargo/config.toml set + # `incremental = true`, which emits per-query save-analysis + # artifacts that sccache does not cache. Turning incremental off + # lets rustc emit pure object output that sccache hashes + # uniformly — same source + same args → cache hit. - name: RUSTC_WRAPPER value: sccache - name: SCCACHE_DIR value: /cargo-target/sccache - name: SCCACHE_CACHE_SIZE value: "40G" + - name: CARGO_INCREMENTAL + value: "0" - name: GITLAB_PAT valueFrom: secretKeyRef: