Skip to content

Commit

Permalink
Build without the bytes by default
Browse files Browse the repository at this point in the history
by changing the default value of `--remote_download_outputs` to `toplevel`.

PiperOrigin-RevId: 543417930
Change-Id: Ibd4a79bc17a395028eb9c8b230968ff0935319d9
  • Loading branch information
coeuvre authored and Copybara-Service committed Jun 26, 2023
1 parent 4cf764d commit 9c96529
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Expand Up @@ -439,7 +439,7 @@ public RemoteBuildEventUploadModeConverter() {
@Option(
name = "remote_download_outputs",
oldName = "experimental_remote_download_outputs",
defaultValue = "all",
defaultValue = "toplevel",
category = "remote",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
Expand Down
Expand Up @@ -205,7 +205,8 @@ private void doRemoteExecWithDiskCache(String... additionalOptions) throws Excep

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

// Assert: Should hit the disk cache
events.assertContainsInfo("2 disk cache hit");
Expand Down
8 changes: 8 additions & 0 deletions src/test/shell/bazel/remote/remote_execution_test.sh
Expand Up @@ -928,10 +928,13 @@ EOF

function test_symlinks_in_directory() {
set_symlinks_in_directory_testfixtures
# Need --remote_download_all because the genrule generates directory output
# for one of the declared outputs which is not supported when BwoB.
bazel build \
--incompatible_remote_symlinks \
--noincompatible_remote_disallow_symlink_in_tree_artifact \
--remote_executor=grpc://localhost:${worker_port} \
--remote_download_all \
--spawn_strategy=remote \
//:make-links &> $TEST_log \
|| fail "Failed to build //:make-links with remote execution"
Expand All @@ -948,11 +951,15 @@ function test_symlinks_in_directory() {
function test_symlinks_in_directory_cache_only() {
# This test is the same as test_symlinks_in_directory, except it works
# locally and uses the remote cache to query results.
#
# Need --remote_download_all because the genrule generates directory output
# for one of the declared outputs which is not supported when BwoB.
set_symlinks_in_directory_testfixtures
bazel build \
--incompatible_remote_symlinks \
--noincompatible_remote_disallow_symlink_in_tree_artifact \
--remote_cache=grpc://localhost:${worker_port} \
--remote_download_all \
--spawn_strategy=local \
//:make-links &> $TEST_log \
|| fail "Failed to build //:make-links with remote cache service"
Expand All @@ -962,6 +969,7 @@ function test_symlinks_in_directory_cache_only() {
--incompatible_remote_symlinks \
--noincompatible_remote_disallow_symlink_in_tree_artifact \
--remote_cache=grpc://localhost:${worker_port} \
--remote_download_all \
--spawn_strategy=local \
//:make-links &> $TEST_log \
|| fail "Failed to build //:make-links with remote cache service"
Expand Down

0 comments on commit 9c96529

Please sign in to comment.