diff --git a/.bazelrc b/.bazelrc index 58eecc1b82..d5f7ab38c2 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,12 +1,3 @@ -############################### -# Typescript / Angular / Sass # -############################### - -# Make compilation fast, by keeping a few copies of the compilers -# running as daemons, and cache SourceFile AST's to reduce parse time. -build --strategy=AngularTemplateCompile=worker -build --strategy=TypeScriptCompile=worker - # Enable debugging tests with --config=debug test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results @@ -146,31 +137,6 @@ build:remote --bes_results_url="https://source.cloud.google.com/results/invocati # This allows us to avoid installing a second copy of node_modules common --experimental_allow_incremental_repository_updates -# This option is changed to true in Bazel 0.27 and exposes a possible -# regression in Bazel 0.27.0. -# Error observed is in npm_package target `//packages/common/locales:package`: -# ``` -# ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling -# npm package packages/common/locales/package failed: No usable spawn strategy found -# for spawn with mnemonic SkylarkAction. Your --spawn_strategyor --strategy flags -# are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for -# migration advises -# ``` -# Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82: -# ``` -# execution_requirements = { -# # Never schedule this action remotely because it's not computationally expensive. -# # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker. -# # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory -# # allowing the .pack and .publish runnables to work with no symlink_prefix -# # See https://github.com/bazelbuild/rules_nodejs/issues/187 -# "local": "1", -# }, -# ``` -build --incompatible_list_based_execution_strategy_selection=false -test --incompatible_list_based_execution_strategy_selection=false -run --incompatible_list_based_execution_strategy_selection=false - #################################################### # User bazel configuration # NOTE: This needs to be the *last* entry in the config. diff --git a/.circleci/bazel.rc b/.circleci/bazel.rc index 315c2667d0..f0893052b9 100644 --- a/.circleci/bazel.rc +++ b/.circleci/bazel.rc @@ -28,3 +28,16 @@ test --flaky_test_attempts=2 # More details on failures build --verbose_failures=true + +# We have seen some flakiness in using TS workers on CircleCI +# https://angular-team.slack.com/archives/C07DT5M6V/p1562693245183400 +# > failures like `ERROR: /home/circleci/ng/packages/core/test/BUILD.bazel:5:1: +# > Compiling TypeScript (devmode) //packages/core/test:test_lib failed: Worker process did not return a WorkResponse:` +# > I saw that issue a couple times today. +# > Example job: https://circleci.com/gh/angular/angular/385517 +# We expect that TypeScript compilations will parallelize wider than the number of local cores anyway +# so we should saturate remote workers with TS compilations +# TODO(jperott): if/when we enable remote cache on CI, we would expect +# to have many fewer TS compilation actions, so local worker might make more sense +--strategy=TypeScriptCompile=remote +--strategy=AngularTemplateCompile=remote