From 9f18a511205fbd74e188f0d42974fe329b9cffe6 Mon Sep 17 00:00:00 2001 From: ulfjack Date: Fri, 14 Jul 2017 17:39:46 +0200 Subject: Simplify exception handling in spawn strategies The main change here is to only catch SpawnExecException in StandaloneTestStrategy, so all other exceptions simplify propagate up. As a result, Bazel no longer retries tests that fail with an exception, we only retry tests that actually ran, had a spawn result, and resulted in a UserExecException. That is probably what we want. Also do some cleanup: - Remove ExecException.timedOut; nobody was calling it (but there's still SpawnExecException.timedOut) - Remove SpawnActionContext.shouldPropagateExecException; all exceptions (except SpawnExecException) are now propagated by default - Remote the SandboxOptions from the SandboxStrategies; all sandboxing options are now handled by the underlying SpawnRunner implementations I'll send a followup CL to remove the UserExecException and EnvironmentalExecException types; the types don't do anything special, and there are no catch blocks in production code that catch one of these more specific types. This should fix #3322 by removing a bunch of special handling. PiperOrigin-RevId: 161960919 --- .../com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java') diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java b/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java index 38c8645f2c..29b572fe53 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedStrategy.java @@ -36,7 +36,6 @@ final class DarwinSandboxedStrategy extends SandboxStrategy { String productName) throws IOException { super( verboseFailures, - buildRequest.getOptions(SandboxOptions.class), new DarwinSandboxedSpawnRunner(cmdEnv, buildRequest, sandboxBase, productName)); } } -- cgit v1.2.3