Skip to content

Commit 6bfacb2

Browse files
authored
build: fix unexpected bazel cache discarding (#19291)
A long-standing issue with our Bazel setup was that the switch between `ibazel` and `bazel` always resulted a slow down. It was difficult to debug this because Bazel did not print anything about what is going on. i.e. it was not clear whether the analysis cache, or repositories have been discarded. After investigation it turns out that we set Bazel starlark semantic options that are applied on to `build` while technically this option also is relevant for Bazel's first processing phase (i.e. `loading phase`). Hence Bazel discarded cache for the first processing phase, and node modules had to be re-instaled and other repositories were fetched again. This is now fixed by removing these options as they aren't needed anymore. Alternatively, we could have changed the option target to `common` so that they also apply to `query`.
1 parent 449caec commit 6bfacb2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

.bazelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,3 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
128128
# Load any settings which are specific to the current user. Needs to be *last* statement
129129
# in this config, as the user configuration should be able to overwrite flags from this file.
130130
try-import .bazelrc.user
131-
132-
# TODO: check if we can enable these deprecations.
133-
build --incompatible_new_actions_api=false
134-
build --incompatible_no_support_tools_in_action_inputs=false

0 commit comments

Comments
 (0)