Commit fe44ddb
authored
ci: refresh Node patch versions on cross-window cache restores (#8179)
This fixes a stale-patch loop where the Node setup action's 20-minute
key rotation was a no-op. 24.15.0 and 22.22.1 took ~2 weeks to land
in CI after release.
Two bugs interact. The cache step's restore-keys omits the time block,
so every cross-window run partial-matches the previous cache and
restores the prior resolved patch. The setup-node step then keys
check-latest off file existence rather than cache-hit, so it passes
the cached patch with check-latest=true. Because semver matches an
exact spec only against itself, check-latest never upgrades 24.14.0
to 24.15.0; the save step re-pins the stale value under the new key.
New patches only land when the cache is fully evicted.
Pass the major (not the cached patch) whenever the cache misses
exactly, and gate that on cache-hit. Exact hits within a 20-minute
window still install the cached patch and skip the manifest lookup;
cross-window runs go through the manifest, and the save step captures
the upgraded patch under the new key.1 parent 5f58236 commit fe44ddb
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
0 commit comments