Commit 915edd0
committed
fix(ci): stop the rust cache key fragmenting across runner images
The warm run added in #2446 was not restorable. It saved
v0-rust-browseros-agent-Linux-x64-77f289fb-... while a test job on the
same commit looked for ...-b588fbb1-..., so the restore key missed and
the job compiled from scratch.
shared-key removed the job name from the key, but rust-cache also folds
in a hash of the rust environment, and that hash is built from every
toolchain `rustup toolchain list` reports rather than the pinned one. The
runner image ships its own Rust next to the pinned 1.95.0, and that set
changes as images roll out, so identical configuration hashes differently
depending on which runner a job lands on.
It splits the existing caches almost evenly, which is why this was never
noticed as an outright miss:
77f289fb 11 entries
b588fbb1 11 entries
two others 1 each
Half the jobs missed, and looked merely slow rather than broken.
Dropping that segment leaves the key as prefix, shared key, OS and arch,
and the lockfile hash, so dependency changes still bust it. Reuse across
toolchains stays safe because cargo fingerprints by rustc version itself
and rebuilds anything that does not match, rather than reusing artifacts
from a different compiler.
Both steps keep identical workspaces, shared-key, cache-directories and
toolchain pin, since all of them feed the key.1 parent 67b8355 commit 915edd0
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| |||
0 commit comments