build: remove build:remote --spawn_strategy=remote from .bazelrc

It seems that with Bazel 1.0.0 setting `--incompatible_list_based_execution_strategy_selection=false` no longer works around the issue with npm_package that it did when it was added. The error that was originally observed has returned after updating to Bazel 1.0.0:

```
ERROR: /home/circleci/ng/packages/angular_devkit/build_optimizer/BUILD:66:1: Assembling npm package packages/angular_devkit/build_optimizer/npm_package failed: No usable spawn strategy found for spawn with mnemonic Action.  Your --spawn_strategy, --genrule_strategy or --strategy flags are probably too strict. Visit bazelbuild/bazel#7480 for migration advice
```

This commit removes both `—incompatible_list_based_execution_strategy_selection=false` as well as `build:remote --spawn_strategy=remote` which means that Bazel will do the default behavior of picking the first available strategy from the default list, which is `remote,worker,sandboxed,local`. See bazelbuild/bazel#7480 for more details.
This commit is contained in:
Alan Agius 2019-10-24 12:13:28 +02:00 committed by vikerman
parent 44de74a5e3
commit 8118ab5e95
3 changed files with 25 additions and 54 deletions

View File

@ -88,19 +88,15 @@ test --test_output=errors
# Remote Execution Setup #
################################
# Use the Angular team internal GCP instance for remote execution.
# Use the Angular team internal GCP instance for remote execution.
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
build:remote --project_id=internal-200822
# Setup the build strategy for various types of actions. Mixing "local" and "remote"
# can cause unexpected results and we want to run everything remotely if possible.
build:remote --spawn_strategy=remote
build:remote --strategy=Javac=remote
build:remote --strategy=Closure=remote
build:remote --strategy=Genrule=remote
# Starting with Bazel 0.27.0 strategies do not need to be explicitly
# defined. See https://github.com/bazelbuild/bazel/issues/7480
build:remote --define=EXECUTOR=remote
# Setup the remote build execution servers.
# Setup the remote build execution servers.
build:remote --remote_cache=remotebuildexecution.googleapis.com
build:remote --remote_executor=remotebuildexecution.googleapis.com
build:remote --tls_enabled=true
@ -138,31 +134,6 @@ build:remote --remote_accept_cached=true
# 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_strategy or --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.
@ -170,4 +141,4 @@ run --incompatible_list_based_execution_strategy_selection=false
# Load any settings which are specific to the current user. Needs to be *last* statement
# in this config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user
try-import .bazelrc.user

View File

@ -84,7 +84,7 @@
"devDependencies": {
"@angular/compiler": "9.0.0-next.12",
"@angular/compiler-cli": "9.0.0-next.12",
"@bazel/bazel": "0.29.0",
"@bazel/bazel": "1.0.0",
"@bazel/buildifier": "0.29.0",
"@bazel/jasmine": "0.39.0",
"@bazel/karma": "0.39.0",

View File

@ -738,31 +738,31 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@bazel/bazel-darwin_x64@0.29.0":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b"
integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw==
"@bazel/bazel-darwin_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab"
integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA==
"@bazel/bazel-linux_x64@0.29.0":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d"
integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw==
"@bazel/bazel-linux_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659"
integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw==
"@bazel/bazel-win32_x64@0.29.0":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d"
integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g==
"@bazel/bazel-win32_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd"
integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA==
"@bazel/bazel@0.29.0":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640"
integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA==
"@bazel/bazel@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-1.0.0.tgz#7c6e306d8ced3a6e087f041861364ef742560342"
integrity sha512-bxNjlieM1HwgIgqx+AqtNeUA6bvqIQ0X5YysWuCCtT24Dd+wTs6fRSx1KGOA1NiRBrg+kpk7ebitOU8yaM+tiA==
dependencies:
"@bazel/hide-bazel-files" latest
optionalDependencies:
"@bazel/bazel-darwin_x64" "0.29.0"
"@bazel/bazel-linux_x64" "0.29.0"
"@bazel/bazel-win32_x64" "0.29.0"
"@bazel/bazel-darwin_x64" "1.0.0"
"@bazel/bazel-linux_x64" "1.0.0"
"@bazel/bazel-win32_x64" "1.0.0"
"@bazel/buildifier-darwin_x64@0.29.0":
version "0.29.0"