Let AbstractSpawnStrategy be more robust against an interface that currently
doesn't always behave as advertised.
RELNOTES: None.
@@ -81,7 +81,6 @@ public abstract class AbstractSpawnStrategy implements SandboxedSpawnActionConte
ActionExecutionContext actionExecutionContext,
AtomicReference<Class<? extends SpawnActionContext>> writeOutputFiles)
throws ExecException, InterruptedException {
-
actionExecutionContext.maybeReportSubcommand(spawn);
final Duration timeout = Spawns.getTimeout(spawn);
@@ -252,6 +251,12 @@ public abstract class AbstractSpawnStrategy implements SandboxedSpawnActionConte
return;
}
+ // TODO(djasper): This should not happen as per the contract of ActionExecutionMetadata, but
+ // there are implementations that violate the contract. Remove when those are gone.
+ if (action.getPrimaryOutput() == null) {
+ return;
+ }
+
// TODO(ulfjack): We should report more details to the UI.
EventBus eventBus = actionExecutionContext.getEventBus();
switch (state) {
