From 987d3874129eac366fe111f481b5d0a1593dd467 Mon Sep 17 00:00:00 2001 From: Luis Fernando Pino Duque Date: Tue, 5 Jul 2022 17:07:01 -0500 Subject: [PATCH] Address comments #2 Signed-off-by: Luis Fernando Pino Duque --- .../build/lib/remote/RemoteExecutionService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java index b9b1d694aa7818..71e7d2b976ef26 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java @@ -1088,10 +1088,6 @@ public InMemoryOutput downloadOutputs(RemoteAction action, RemoteActionResult re tmpOutErr.clearOut(); tmpOutErr.clearErr(); - if (!forcedDownloads.isEmpty()) { - moveOutputsToFinalLocation(forcedDownloads); - } - if (downloadOutputs) { moveOutputsToFinalLocation(downloads); @@ -1109,6 +1105,13 @@ public InMemoryOutput downloadOutputs(RemoteAction action, RemoteActionResult re // might not be supported on all platforms createSymlinks(symlinks); } else { + // TODO(bazel-team): We should unify this if-block to rely on downloadOutputs above but, as of 2022-07-05, + // downloadOuputs' semantics isn't exactly the same as build-without-the-bytes which is necessary for using + // remoteDownloadRegex. + if (!forcedDownloads.isEmpty()) { + moveOutputsToFinalLocation(forcedDownloads); + } + ActionInput inMemoryOutput = null; Digest inMemoryOutputDigest = null; PathFragment inMemoryOutputPath = getInMemoryOutputPath(action.getSpawn());