Skip to content

Commit caa29cb

Browse files
committed
ci: remove cache fallbacks
Remove the cache fallbacks in CircleCI's configuration as they cause difficult to debug errors and provide little safety as compared to their execution costs to populate.
1 parent f315022 commit caa29cb

File tree

2 files changed

+7
-140
lines changed

2 files changed

+7
-140
lines changed

.circleci/bazel.windows.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ build --local_ram_resources=13500
1515
build --local_cpu_resources=4
1616

1717
# All windows jobs run on master and should use http caching
18-
build --remote_http_cache=https://storage.googleapis.com/angular-team-cache
19-
build --remote_accept_cached=true
20-
build --remote_upload_local_results=true
21-
build --google_default_credentials
18+
#build --remote_http_cache=https://storage.googleapis.com/angular-team-cache
19+
#build --remote_accept_cached=true
20+
#build --remote_upload_local_results=true
21+
#build --google_default_credentials

.circleci/config.yml

Lines changed: 3 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,14 @@ version: 2.1
1818
# cache changes. For example:
1919
# 1) yarn lock file changes --> cached "node_modules" are different.
2020
# 2) bazel repository definitions change --> cached bazel repositories are different.
21-
# Windows needs its own cache key because binaries in node_modules are different.
22-
# **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
23-
# **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
21+
# Windows needs its own cache key because binaries in node_modules are different
22+
# **NOTE **: Keep the static part of the cache key as prefix to enable correct fallbacks.
2423
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
2524
var_3: &cache_key v7-angular-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
26-
# We invalidate the cache if the Bazel version changes because otherwise the `bazelisk` cache
27-
# folder will contain all previously used versions and ultimately cause the cache restoring to
28-
# be slower due to its growing size.
29-
var_4: &cache_key_fallback v7-angular-node-12-{{ checksum ".bazelversion" }}
30-
var_3_win: &cache_key_win v7-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
31-
var_4_win: &cache_key_win_fallback v7-angular-win-node-12-{{ checksum ".bazelversion" }}
32-
25+
var_4: &cache_key_win v7-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
3326
# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
3427
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
3528
var_5: &components_repo_unit_tests_cache_key v9-angular-components-09e68db8ed5b1253f2fe38ff954ef0df019fc25a
36-
var_6: &components_repo_unit_tests_cache_key_fallback v9-angular-components-
3729

3830
# Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and
3931
# `build-ivy-npm-packages`.
@@ -192,7 +184,6 @@ commands:
192184
- restore_cache:
193185
keys:
194186
- *cache_key_win
195-
- *cache_key_win_fallback
196187
# Reinstall to get windows binaries.
197188
- run: yarn install --frozen-lockfile --non-interactive
198189
# Install @bazel/bazelisk globally and use that for the first run.
@@ -241,7 +232,6 @@ jobs:
241232
- restore_cache:
242233
keys:
243234
- *cache_key
244-
- *cache_key_fallback
245235
- run:
246236
name: Running Yarn install
247237
command: yarn install --frozen-lockfile --non-interactive
@@ -704,7 +694,6 @@ jobs:
704694
# the repository from scratch and it would slow down the job. This is because we can't
705695
# clone the repository with reduced `--depth`, but rather need to clone the whole
706696
# repository to be able to support arbitrary SHAs.
707-
- *components_repo_unit_tests_cache_key_fallback
708697
- run:
709698
name: "Fetching angular/components repository"
710699
command: ./scripts/ci/clone_angular_components_repo.sh
@@ -789,129 +778,7 @@ workflows:
789778
filters:
790779
branches:
791780
ignore: g3
792-
- lint:
793-
requires:
794-
- setup
795-
- test:
796-
requires:
797-
- setup
798-
- test_ivy_aot:
799-
requires:
800-
- setup
801-
- build-npm-packages:
802-
requires:
803-
- setup
804-
- build-ivy-npm-packages:
805-
requires:
806-
- setup
807-
- legacy-unit-tests-saucelabs:
808-
requires:
809-
- setup
810-
- test_aio:
811-
requires:
812-
- setup
813-
- deploy_aio:
814-
requires:
815-
- test_aio
816-
- test_aio_local:
817-
requires:
818-
- build-npm-packages
819-
- test_aio_local:
820-
name: test_aio_local_viewengine
821-
viewengine: true
822-
requires:
823-
- build-npm-packages
824-
- test_aio_tools:
825-
requires:
826-
- build-npm-packages
827-
- test_docs_examples:
828-
requires:
829-
- build-npm-packages
830-
- test_docs_examples:
831-
name: test_docs_examples_viewengine
832-
viewengine: true
833-
requires:
834-
- build-npm-packages
835-
- aio_preview:
836-
# Only run on PR builds. (There can be no previews for non-PR builds.)
837-
<<: *only_on_pull_requests
838-
requires:
839-
- setup
840-
- test_aio_preview:
841-
requires:
842-
- aio_preview
843-
- publish_packages_as_artifacts:
844-
requires:
845-
- build-npm-packages
846-
- publish_snapshot:
847-
# Note: no filters on this job because we want it to run for all upstream branches
848-
# We'd really like to filter out pull requests here, but not yet available:
849-
# https://discuss.circleci.com/t/workflows-pull-request-filter/14396/4
850-
# Instead, the job just exits immediately at the first step.
851-
requires:
852-
# Only publish if tests and integration tests pass
853-
- test
854-
- test_ivy_aot
855-
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
856-
- test_aio_local
857-
- test_aio_local_viewengine
858-
- test_docs_examples
859-
- test_docs_examples_viewengine
860-
# Get the artifacts to publish from the build-packages-dist job
861-
# since the publishing script expects the legacy outputs layout.
862-
- build-npm-packages
863-
- build-ivy-npm-packages
864-
- legacy-unit-tests-saucelabs
865-
- components-repo-unit-tests:
866-
requires:
867-
- build-npm-packages
868-
- test_zonejs:
869-
requires:
870-
- setup
871-
# Windows Jobs
872-
# These are very slow so we run them on non-PRs only for now.
873-
# TODO: remove the filter when CircleCI makes Windows FS faster.
874-
# The Windows jobs are only run after their non-windows counterparts finish successfully.
875-
# This isn't strictly necessary as there is no artifact dependency, but helps economize
876-
# CI resources by not attempting to build when we know should fail.
877781
- test_win:
878782
<<: *skip_on_pull_requests
879-
requires:
880-
- test
881-
- test_ivy_aot_win:
882-
<<: *skip_on_pull_requests
883-
requires:
884-
- test_ivy_aot
885-
886-
monitoring:
887-
jobs:
888-
- setup
889-
- aio_monitoring_stable:
890-
requires:
891-
- setup
892-
- aio_monitoring_next:
893-
requires:
894-
- setup
895-
- saucelabs_ivy:
896-
# Testing saucelabs via Bazel currently taking longer than the legacy saucelabs job as it
897-
# each karma_web_test target is provisioning and tearing down browsers which is adding
898-
# a lot of overhead. Running once daily on master only to avoid wasting resources and
899-
# slowing down CI for PRs.
900-
# TODO: Run this job on all branches (including PRs) once karma_web_test targets can
901-
# share provisioned browsers and we can remove the legacy saucelabs job.
902-
requires:
903-
- setup
904-
- saucelabs_view_engine:
905-
# Testing saucelabs via Bazel currently taking longer than the legacy saucelabs job as it
906-
# each karma_web_test target is provisioning and tearing down browsers which is adding
907-
# a lot of overhead. Running once daily on master only to avoid wasting resources and
908-
# slowing down CI for PRs.
909-
# TODO: Run this job on all branches (including PRs) once karma_web_test targets can
910-
# share provisioned browsers and we can remove the legacy saucelabs job.
911783
requires:
912784
- setup
913-
triggers:
914-
- schedule:
915-
<<: *only_on_master
916-
# Runs monitoring jobs at 10:00AM every day.
917-
cron: "0 10 * * *"

0 commit comments

Comments
 (0)