Skip to content

Commit 8118ab5

Browse files
alan-agius4vikerman
authored andcommitted
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.
1 parent 44de74a commit 8118ab5

3 files changed

Lines changed: 25 additions & 54 deletions

File tree

.bazelrc

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,15 @@ test --test_output=errors
8888
# Remote Execution Setup #
8989
################################
9090

91-
# Use the Angular team internal GCP instance for remote execution.
91+
# Use the Angular team internal GCP instance for remote execution.
9292
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
9393
build:remote --project_id=internal-200822
9494

95-
# Setup the build strategy for various types of actions. Mixing "local" and "remote"
96-
# can cause unexpected results and we want to run everything remotely if possible.
97-
build:remote --spawn_strategy=remote
98-
build:remote --strategy=Javac=remote
99-
build:remote --strategy=Closure=remote
100-
build:remote --strategy=Genrule=remote
95+
# Starting with Bazel 0.27.0 strategies do not need to be explicitly
96+
# defined. See https://github.com/bazelbuild/bazel/issues/7480
10197
build:remote --define=EXECUTOR=remote
10298

103-
# Setup the remote build execution servers.
99+
# Setup the remote build execution servers.
104100
build:remote --remote_cache=remotebuildexecution.googleapis.com
105101
build:remote --remote_executor=remotebuildexecution.googleapis.com
106102
build:remote --tls_enabled=true
@@ -138,36 +134,11 @@ build:remote --remote_accept_cached=true
138134
# This allows us to avoid installing a second copy of node_modules
139135
common --experimental_allow_incremental_repository_updates
140136

141-
# This option is changed to true in Bazel 0.27 and exposes a possible
142-
# regression in Bazel 0.27.0.
143-
# Error observed is in npm_package target `//packages/common/locales:package`:
144-
# ```
145-
# ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling
146-
# npm package packages/common/locales/package failed: No usable spawn strategy found
147-
# for spawn with mnemonic SkylarkAction. Your --spawn_strategy or --strategy flags
148-
# are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for
149-
# migration advises
150-
# ```
151-
# Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82:
152-
# ```
153-
# execution_requirements = {
154-
# # Never schedule this action remotely because it's not computationally expensive.
155-
# # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker.
156-
# # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory
157-
# # allowing the .pack and .publish runnables to work with no symlink_prefix
158-
# # See https://github.com/bazelbuild/rules_nodejs/issues/187
159-
# "local": "1",
160-
# },
161-
# ```
162-
build --incompatible_list_based_execution_strategy_selection=false
163-
test --incompatible_list_based_execution_strategy_selection=false
164-
run --incompatible_list_based_execution_strategy_selection=false
165-
166137
####################################################
167138
# User bazel configuration
168139
# NOTE: This needs to be the *last* entry in the config.
169140
####################################################
170141

171142
# Load any settings which are specific to the current user. Needs to be *last* statement
172143
# in this config, as the user configuration should be able to overwrite flags from this file.
173-
try-import .bazelrc.user
144+
try-import .bazelrc.user

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"devDependencies": {
8585
"@angular/compiler": "9.0.0-next.12",
8686
"@angular/compiler-cli": "9.0.0-next.12",
87-
"@bazel/bazel": "0.29.0",
87+
"@bazel/bazel": "1.0.0",
8888
"@bazel/buildifier": "0.29.0",
8989
"@bazel/jasmine": "0.39.0",
9090
"@bazel/karma": "0.39.0",

yarn.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -738,31 +738,31 @@
738738
lodash "^4.17.13"
739739
to-fast-properties "^2.0.0"
740740

741-
"@bazel/bazel-darwin_x64@0.29.0":
742-
version "0.29.0"
743-
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b"
744-
integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw==
741+
"@bazel/bazel-darwin_x64@1.0.0":
742+
version "1.0.0"
743+
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab"
744+
integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA==
745745

746-
"@bazel/bazel-linux_x64@0.29.0":
747-
version "0.29.0"
748-
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d"
749-
integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw==
746+
"@bazel/bazel-linux_x64@1.0.0":
747+
version "1.0.0"
748+
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659"
749+
integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw==
750750

751-
"@bazel/bazel-win32_x64@0.29.0":
752-
version "0.29.0"
753-
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d"
754-
integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g==
751+
"@bazel/bazel-win32_x64@1.0.0":
752+
version "1.0.0"
753+
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd"
754+
integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA==
755755

756-
"@bazel/bazel@0.29.0":
757-
version "0.29.0"
758-
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640"
759-
integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA==
756+
"@bazel/bazel@1.0.0":
757+
version "1.0.0"
758+
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-1.0.0.tgz#7c6e306d8ced3a6e087f041861364ef742560342"
759+
integrity sha512-bxNjlieM1HwgIgqx+AqtNeUA6bvqIQ0X5YysWuCCtT24Dd+wTs6fRSx1KGOA1NiRBrg+kpk7ebitOU8yaM+tiA==
760760
dependencies:
761761
"@bazel/hide-bazel-files" latest
762762
optionalDependencies:
763-
"@bazel/bazel-darwin_x64" "0.29.0"
764-
"@bazel/bazel-linux_x64" "0.29.0"
765-
"@bazel/bazel-win32_x64" "0.29.0"
763+
"@bazel/bazel-darwin_x64" "1.0.0"
764+
"@bazel/bazel-linux_x64" "1.0.0"
765+
"@bazel/bazel-win32_x64" "1.0.0"
766766

767767
"@bazel/buildifier-darwin_x64@0.29.0":
768768
version "0.29.0"

0 commit comments

Comments
 (0)