Skip to content

Commit 371fbf6

Browse files
committed
Revert "[7.3.0] Deduplicate locally executed path mapped spawns (bazelbuild#23069)"
This reverts commit ffe1df5. Causes race conditions, see bazelbuild#23288 for details.
1 parent d89b97d commit 371fbf6

File tree

12 files changed

+152
-929
lines changed

12 files changed

+152
-929
lines changed

src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -488,149 +488,6 @@ public Digest getDigest() {
488488
}
489489
}
490490

491-
/**
492-
* A helper class for wrapping an existing {@link SpawnResult} and modifying a subset of its
493-
* methods.
494-
*/
495-
class DelegateSpawnResult implements SpawnResult {
496-
private final SpawnResult delegate;
497-
498-
public DelegateSpawnResult(SpawnResult delegate) {
499-
this.delegate = delegate;
500-
}
501-
502-
@Override
503-
public boolean setupSuccess() {
504-
return delegate.setupSuccess();
505-
}
506-
507-
@Override
508-
public boolean isCatastrophe() {
509-
return delegate.isCatastrophe();
510-
}
511-
512-
@Override
513-
public Status status() {
514-
return delegate.status();
515-
}
516-
517-
@Override
518-
public int exitCode() {
519-
return delegate.exitCode();
520-
}
521-
522-
@Override
523-
@Nullable
524-
public FailureDetail failureDetail() {
525-
return delegate.failureDetail();
526-
}
527-
528-
@Override
529-
@Nullable
530-
public String getExecutorHostName() {
531-
return delegate.getExecutorHostName();
532-
}
533-
534-
@Override
535-
public String getRunnerName() {
536-
return delegate.getRunnerName();
537-
}
538-
539-
@Override
540-
public String getRunnerSubtype() {
541-
return delegate.getRunnerSubtype();
542-
}
543-
544-
@Override
545-
@Nullable
546-
public Instant getStartTime() {
547-
return delegate.getStartTime();
548-
}
549-
550-
@Override
551-
public int getWallTimeInMs() {
552-
return delegate.getWallTimeInMs();
553-
}
554-
555-
@Override
556-
public int getUserTimeInMs() {
557-
return delegate.getUserTimeInMs();
558-
}
559-
560-
@Override
561-
public int getSystemTimeInMs() {
562-
return delegate.getSystemTimeInMs();
563-
}
564-
565-
@Override
566-
@Nullable
567-
public Long getNumBlockOutputOperations() {
568-
return delegate.getNumBlockOutputOperations();
569-
}
570-
571-
@Override
572-
@Nullable
573-
public Long getNumBlockInputOperations() {
574-
return delegate.getNumBlockInputOperations();
575-
}
576-
577-
@Override
578-
@Nullable
579-
public Long getNumInvoluntaryContextSwitches() {
580-
return delegate.getNumInvoluntaryContextSwitches();
581-
}
582-
583-
@Override
584-
@Nullable
585-
public Long getMemoryInKb() {
586-
return delegate.getMemoryInKb();
587-
}
588-
589-
@Override
590-
public SpawnMetrics getMetrics() {
591-
return delegate.getMetrics();
592-
}
593-
594-
@Override
595-
public boolean isCacheHit() {
596-
return delegate.isCacheHit();
597-
}
598-
599-
@Override
600-
public String getFailureMessage() {
601-
return delegate.getFailureMessage();
602-
}
603-
604-
@Override
605-
@Nullable
606-
public InputStream getInMemoryOutput(ActionInput output) {
607-
return delegate.getInMemoryOutput(output);
608-
}
609-
610-
@Override
611-
public String getDetailMessage(
612-
String message, boolean catastrophe, boolean forciblyRunRemotely) {
613-
return delegate.getDetailMessage(message, catastrophe, forciblyRunRemotely);
614-
}
615-
616-
@Override
617-
@Nullable
618-
public MetadataLog getActionMetadataLog() {
619-
return delegate.getActionMetadataLog();
620-
}
621-
622-
@Override
623-
public boolean wasRemote() {
624-
return delegate.wasRemote();
625-
}
626-
627-
@Override
628-
@Nullable
629-
public Digest getDigest() {
630-
return delegate.getDigest();
631-
}
632-
}
633-
634491
/** Builder class for {@link SpawnResult}. */
635492
final class Builder {
636493
private int exitCode;

src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public ImmutableList<SpawnResult> exec(
221221
? resultMessage
222222
: CommandFailureUtils.describeCommandFailure(
223223
executionOptions.verboseFailures, cwd, spawn);
224-
throw new SpawnExecException(message, spawnResult, /* forciblyRunRemotely= */ false);
224+
throw new SpawnExecException(message, spawnResult, /*forciblyRunRemotely=*/ false);
225225
}
226226
return ImmutableList.of(spawnResult);
227227
}

src/main/java/com/google/devtools/build/lib/exec/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ java_library(
225225
deps = [
226226
":spawn_runner",
227227
"//src/main/java/com/google/devtools/build/lib/actions",
228-
"//src/main/java/com/google/devtools/build/lib/profiler",
229228
],
230229
)
231230

src/main/java/com/google/devtools/build/lib/exec/SpawnCache.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.google.devtools.build.lib.actions.ForbiddenActionInputException;
1919
import com.google.devtools.build.lib.actions.Spawn;
2020
import com.google.devtools.build.lib.actions.SpawnResult;
21-
import com.google.devtools.build.lib.actions.Spawns;
2221
import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionContext;
2322
import java.io.Closeable;
2423
import java.io.IOException;

0 commit comments

Comments
 (0)