Skip to content

Commit

Permalink
Flip --incompatible_remote_disallow_symlink_in_tree_artifact.
Browse files Browse the repository at this point in the history
The incompatible changes pipeline hasn't detected any breakages.

Fixes #18284.

PiperOrigin-RevId: 531485083
Change-Id: Ic48dd79a88fa24bd01a64bc8db40e74216f78f3c
  • Loading branch information
tjgq authored and copybara-github committed May 12, 2023
1 parent f30c923 commit 03ca286
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion src/test/shell/bazel/remote/remote_execution_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 03ca286

Please sign in to comment.