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 30844a87bac50a..26ddfbd2e1713d 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 @@ -32,7 +32,6 @@ import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.exec.SpawnCache; import com.google.devtools.build.lib.exec.SpawnCheckingCacheEvent; -import com.google.devtools.build.lib.exec.SpawnExecutingEvent; import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext; import com.google.devtools.build.lib.profiler.Profiler; import com.google.devtools.build.lib.profiler.ProfilerTask; @@ -54,9 +53,6 @@ final class RemoteSpawnCache implements SpawnCache { private static final SpawnCheckingCacheEvent SPAWN_CHECKING_CACHE_EVENT = SpawnCheckingCacheEvent.create("remote-cache"); - private static final SpawnExecutingEvent SPAWN_EXECUTING_EVENT = - SpawnExecutingEvent.create("remote-cache"); - private final Path execRoot; private final RemoteOptions options; private final boolean verboseFailures; @@ -150,10 +146,6 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context) } } - context.prefetchInputsAndWait(); - - context.report(SPAWN_EXECUTING_EVENT); - if (shouldUploadLocalResults) { return new CacheHandle() { @Override diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java index b0495928d6bbfa..a28ffc917ce538 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java @@ -60,7 +60,6 @@ import com.google.devtools.build.lib.events.StoredEventHandler; import com.google.devtools.build.lib.exec.SpawnCache.CacheHandle; import com.google.devtools.build.lib.exec.SpawnCheckingCacheEvent; -import com.google.devtools.build.lib.exec.SpawnExecutingEvent; import com.google.devtools.build.lib.exec.SpawnInputExpander; import com.google.devtools.build.lib.exec.SpawnRunner.ProgressStatus; import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext; @@ -352,10 +351,7 @@ public void cacheMiss() throws Exception { doNothing().when(service).uploadOutputs(any(), any()); entry.store(result); verify(service).uploadOutputs(any(), any()); - assertThat(progressUpdates) - .containsExactly( - SpawnCheckingCacheEvent.create("remote-cache"), - SpawnExecutingEvent.create("remote-cache")); + assertThat(progressUpdates).containsExactly(SpawnCheckingCacheEvent.create("remote-cache")); } @Test @@ -508,10 +504,7 @@ public void failedActionsAreNotUploaded() throws Exception { .build(); entry.store(result); verify(service, never()).uploadOutputs(any(), any()); - assertThat(progressUpdates) - .containsExactly( - SpawnCheckingCacheEvent.create("remote-cache"), - SpawnExecutingEvent.create("remote-cache")); + assertThat(progressUpdates).containsExactly(SpawnCheckingCacheEvent.create("remote-cache")); } @Test @@ -542,10 +535,7 @@ public void printWarningIfDownloadFails() throws Exception { Event evt = eventHandler.getEvents().get(0); assertThat(evt.getKind()).isEqualTo(EventKind.WARNING); assertThat(evt.getMessage()).contains("UNAVAILABLE"); - assertThat(progressUpdates) - .containsExactly( - SpawnCheckingCacheEvent.create("remote-cache"), - SpawnExecutingEvent.create("remote-cache")); + assertThat(progressUpdates).containsExactly(SpawnCheckingCacheEvent.create("remote-cache")); } @Test @@ -589,10 +579,7 @@ public CachedActionResult answer(InvocationOnMock invocation) { doNothing().when(service).uploadOutputs(any(), any()); entry.store(result); verify(service).uploadOutputs(any(), eq(result)); - assertThat(progressUpdates) - .containsExactly( - SpawnCheckingCacheEvent.create("remote-cache"), - SpawnExecutingEvent.create("remote-cache")); + assertThat(progressUpdates).containsExactly(SpawnCheckingCacheEvent.create("remote-cache")); assertThat(eventHandler.getEvents()).isEmpty(); // no warning is printed. }