Skip to content

Commit 7d7b509

Browse files
devversionandrewseguin
authored andcommitted
build: bazel repository changes not cached on circleci (#14642)
Currently if we update the Bazel `WORKSPACE` and some external repositories have changed, CircleCI won't be able to cache the bazel repositories because the cache-key has not changed and saving will be skipped. We should make sure that the Bazel repositories will be cached properly because otherwise this can cause a significant slow-down with Bazel managed deps. Additionally we no longer store the cache based on the current `branch` because that means that caching does not always work for pull requests. Since the caching only depends on two inputs (yarn.lock and WORKSPACE), it's safe to just remove the branch from the cache key.
1 parent 77f568b commit 7d7b509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# http://yaml-online-parser.appspot.com/
99

1010
var_1: &docker_image angular/ngcontainer:0.7.0
11-
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0
11+
var_2: &cache_key v2-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}-0.7.0
1212

1313
# Settings common to each job
1414
var_3: &job_defaults

0 commit comments

Comments
 (0)