diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java index 86547ea217065c..cd5f89b77fc875 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java @@ -419,7 +419,7 @@ public RemoteBuildEventUploadModeConverter() { @Option( name = "incompatible_remote_disallow_symlink_in_tree_artifact", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.REMOTE, effectTags = {OptionEffectTag.EXECUTION}, metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE}, diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java index 61a16d74b33e13..56c919284e529f 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java @@ -658,7 +658,9 @@ public void downloadOutputs_relativeSymlinkInDirectory_success() throws Exceptio RemoteActionResult.createFromCache(CachedActionResult.remote(builder.build())); Spawn spawn = newSpawnFromResult(result); FakeSpawnExecutionContext context = newSpawnExecutionContext(spawn); - RemoteExecutionService service = newRemoteExecutionService(); + RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class); + remoteOptions.incompatibleRemoteDisallowSymlinkInTreeArtifact = false; + RemoteExecutionService service = newRemoteExecutionService(remoteOptions); RemoteAction action = service.buildRemoteAction(spawn, context); // Doesn't check for dangling links, hence download succeeds. diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh index c13cc6c800eeb8..0945e101a0c3bb 100755 --- a/src/test/shell/bazel/remote/remote_execution_test.sh +++ b/src/test/shell/bazel/remote/remote_execution_test.sh @@ -930,6 +930,7 @@ function test_symlinks_in_directory() { set_symlinks_in_directory_testfixtures bazel build \ --incompatible_remote_symlinks \ + --noincompatible_remote_disallow_symlink_in_tree_artifact \ --remote_executor=grpc://localhost:${worker_port} \ --spawn_strategy=remote \ //:make-links &> $TEST_log \ @@ -950,6 +951,7 @@ function test_symlinks_in_directory_cache_only() { set_symlinks_in_directory_testfixtures bazel build \ --incompatible_remote_symlinks \ + --noincompatible_remote_disallow_symlink_in_tree_artifact \ --remote_cache=grpc://localhost:${worker_port} \ --spawn_strategy=local \ //:make-links &> $TEST_log \ @@ -958,6 +960,7 @@ function test_symlinks_in_directory_cache_only() { bazel clean # Get rid of local results, rely on remote cache. bazel build \ --incompatible_remote_symlinks \ + --noincompatible_remote_disallow_symlink_in_tree_artifact \ --remote_cache=grpc://localhost:${worker_port} \ --spawn_strategy=local \ //:make-links &> $TEST_log \ @@ -2319,12 +2322,12 @@ EOF bazel build \ --spawn_strategy=remote \ --remote_executor=grpc://localhost:${worker_port} \ + --noincompatible_remote_disallow_symlink_in_tree_artifact \ //pkg:tree &>$TEST_log || fail "Expected build to succeed" bazel clean bazel build \ - --incompatible_remote_disallow_symlink_in_tree_artifact \ --spawn_strategy=remote \ --remote_executor=grpc://localhost:${worker_port} \ //pkg:tree &>$TEST_log && fail "Expected build to fail"