Skip to content

Commit aef5c92

Browse files
devversionAndrewKushnir
authored andcommitted
ci: invalidate cache for windows job to prune unused nested node_modules (angular#45872)
An additional issue with the current approach of how Yarn and Bazel interact, Yarn 1.x. does not prune unused nested `node_modules`. This can throw-off the Bazel NodeJS rules because they (correctly) would not expect such a nested folder. This seems to happen in some caches currently, so we invalidate the cache. Its worth seeing if we should rather cache the Yarn cache folder on Windows as well, but for now this will remain as is. Yarn 2.x+ will solve this for us, by addressing the root-cause. Dev-Infra already has Yarn 2.x+ running, so it's not far from happening. PR Close angular#45872
1 parent 9555565 commit aef5c92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ var_3: &cache_key v6-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".ba
3131
var_4: &cache_key_fallback v6-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
3232

3333
# Windows needs its own cache key because binaries in node_modules are different.
34-
var_3_win: &cache_key_win v7-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}
35-
var_4_win: &cache_key_win_fallback v7-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
34+
var_3_win: &cache_key_win v8-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}
35+
var_4_win: &cache_key_win_fallback v8-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
3636

3737
# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
3838
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.

0 commit comments

Comments
 (0)