Skip to content

Commit

Permalink
Use the "no-remote" execution requirement instead of "local" for the …
Browse files Browse the repository at this point in the history
…coverage action.

The latter is frowned upon, as it disables sandboxing.

PiperOrigin-RevId: 536835602
Change-Id: Id77daf2b9fae53c55fcc7d1987bdb979bb2087df
  • Loading branch information
tjgq authored and copybara-github committed May 31, 2023
1 parent db2e18d commit 188b4ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/actions:action_lookup_key",
"//src/main/java/com/google/devtools/build/lib/actions:artifact_owner",
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
"//src/main/java/com/google/devtools/build/lib/actions:execution_requirements",
"//src/main/java/com/google/devtools/build/lib/actions:localhost_capacity",
"//src/main/java/com/google/devtools/build/lib/analysis:actions/compression",
"//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.google.devtools.build.lib.actions.ArtifactRoot;
import com.google.devtools.build.lib.actions.BaseSpawn;
import com.google.devtools.build.lib.actions.ExecException;
import com.google.devtools.build.lib.actions.ExecutionRequirements;
import com.google.devtools.build.lib.actions.NotifyOnActionCacheHit;
import com.google.devtools.build.lib.actions.ResourceSet;
import com.google.devtools.build.lib.actions.RunfilesSupplier;
Expand Down Expand Up @@ -129,7 +130,7 @@ public ActionResult execute(ActionExecutionContext actionExecutionContext)
throws ActionExecutionException, InterruptedException {
try {
ImmutableMap<String, String> executionInfo =
remotable ? ImmutableMap.of() : ImmutableMap.of("local", "");
remotable ? ImmutableMap.of() : ImmutableMap.of(ExecutionRequirements.NO_REMOTE, "");
Spawn spawn =
new BaseSpawn(
command, ImmutableMap.of(), executionInfo, runfilesSupplier, this, LOCAL_RESOURCES);
Expand Down

0 comments on commit 188b4ef

Please sign in to comment.