Consolidating the uses of remoteExecutionProperties in preparation for adding
extra logic.
As a side effect, Docker Sandbox now recognizes remote_default_platform_properties
RELNOTES: Docker Sandbox now respects remote_default_platform_properties
PiperOrigin-RevId: 259581729
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index 1f3908a..06f4a04 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -35,6 +35,7 @@
import com.google.devtools.build.lib.actions.SpawnResult.Status;
import com.google.devtools.build.lib.actions.Spawns;
import com.google.devtools.build.lib.actions.cache.VirtualActionInput;
+import com.google.devtools.build.lib.analysis.platform.PlatformUtils;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.Reporter;
@@ -129,9 +130,7 @@
Digest merkleTreeRoot = merkleTree.getRootDigest();
// Get the remote platform properties.
- Platform platform =
- RemoteSpawnRunner.parsePlatform(
- spawn.getExecutionPlatform(), options.remoteDefaultPlatformProperties);
+ Platform platform = PlatformUtils.getPlatformProto(spawn.getExecutionPlatform(), options);
Command command =
RemoteSpawnRunner.buildCommand(