Skip to content

Commit 9c96529

Browse files
coeuvrecopybara-github
authored andcommitted
Build without the bytes by default
by changing the default value of `--remote_download_outputs` to `toplevel`. PiperOrigin-RevId: 543417930 Change-Id: Ibd4a79bc17a395028eb9c8b230968ff0935319d9
1 parent 4cf764d commit 9c96529

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public RemoteBuildEventUploadModeConverter() {
439439
@Option(
440440
name = "remote_download_outputs",
441441
oldName = "experimental_remote_download_outputs",
442-
defaultValue = "all",
442+
defaultValue = "toplevel",
443443
category = "remote",
444444
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
445445
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},

src/test/java/com/google/devtools/build/lib/remote/DiskCacheIntegrationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ private void doRemoteExecWithDiskCache(String... additionalOptions) throws Excep
205205

206206
@Test
207207
public void remoteExecWithDiskCache_hitDiskCache() throws Exception {
208-
doRemoteExecWithDiskCache();
208+
// Download all outputs to populate the disk cache.
209+
doRemoteExecWithDiskCache("--remote_download_all");
209210

210211
// Assert: Should hit the disk cache
211212
events.assertContainsInfo("2 disk cache hit");

src/test/shell/bazel/remote/remote_execution_test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,13 @@ EOF
928928

929929
function test_symlinks_in_directory() {
930930
set_symlinks_in_directory_testfixtures
931+
# Need --remote_download_all because the genrule generates directory output
932+
# for one of the declared outputs which is not supported when BwoB.
931933
bazel build \
932934
--incompatible_remote_symlinks \
933935
--noincompatible_remote_disallow_symlink_in_tree_artifact \
934936
--remote_executor=grpc://localhost:${worker_port} \
937+
--remote_download_all \
935938
--spawn_strategy=remote \
936939
//:make-links &> $TEST_log \
937940
|| fail "Failed to build //:make-links with remote execution"
@@ -948,11 +951,15 @@ function test_symlinks_in_directory() {
948951
function test_symlinks_in_directory_cache_only() {
949952
# This test is the same as test_symlinks_in_directory, except it works
950953
# locally and uses the remote cache to query results.
954+
#
955+
# Need --remote_download_all because the genrule generates directory output
956+
# for one of the declared outputs which is not supported when BwoB.
951957
set_symlinks_in_directory_testfixtures
952958
bazel build \
953959
--incompatible_remote_symlinks \
954960
--noincompatible_remote_disallow_symlink_in_tree_artifact \
955961
--remote_cache=grpc://localhost:${worker_port} \
962+
--remote_download_all \
956963
--spawn_strategy=local \
957964
//:make-links &> $TEST_log \
958965
|| fail "Failed to build //:make-links with remote cache service"
@@ -962,6 +969,7 @@ function test_symlinks_in_directory_cache_only() {
962969
--incompatible_remote_symlinks \
963970
--noincompatible_remote_disallow_symlink_in_tree_artifact \
964971
--remote_cache=grpc://localhost:${worker_port} \
972+
--remote_download_all \
965973
--spawn_strategy=local \
966974
//:make-links &> $TEST_log \
967975
|| fail "Failed to build //:make-links with remote cache service"

0 commit comments

Comments
 (0)