aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
diff options
context:
space:
mode:
authorGravatar felly <felly@google.com>2018-08-10 10:37:56 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-10 10:39:31 -0700
commit2b3befd9746ffc8ed1a6f02bf260a91282fa489e (patch)
tree300f1a2d551e108b190364851a96ada88baf5ffe /src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
parent20cf8a6b4ed9d06433ce2a57b91df96d849c546e (diff)
Automated rollback of commit 9374ecf94ce44e8bc56e68678cb512abf4cf9ce2.
*** Reason for rollback *** Rollforward with deduplication of traversals and regression test. RELNOTES: None *** Original change description *** Automated rollback of commit 39974a43abdd32e3a1acbc7da945b08da9983e4e. *** Reason for rollback *** b/112458627 *** Original change description *** Allow skyframe-aware actions to pass partial results through ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208231719
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
index 7bff8b0193..0905cf1bef 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
@@ -187,8 +187,9 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
return null;
}
+ Object skyframeDepsResult;
try {
- establishSkyframeDependencies(env, action);
+ skyframeDepsResult = establishSkyframeDependencies(env, action);
} catch (ActionExecutionException e) {
throw new ActionExecutionFunctionException(e);
}
@@ -213,7 +214,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
try {
result =
checkCacheAndExecuteIfNeeded(
- action, state, env, clientEnv, actionLookupData, sharedActionAlreadyRan);
+ action, state, env, clientEnv, actionLookupData, sharedActionAlreadyRan,
+ skyframeDepsResult);
} catch (ActionExecutionException e) {
// Remove action from state map in case it's there (won't be unless it discovers inputs).
stateMap.remove(action);
@@ -363,7 +365,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
Environment env,
Map<String, String> clientEnv,
ActionLookupData actionLookupData,
- boolean sharedActionAlreadyRan)
+ boolean sharedActionAlreadyRan,
+ Object skyframeDepsResult)
throws ActionExecutionException, InterruptedException {
// If this is a shared action and the other action is the one that executed, we must use that
// other action's value, provided here, since it is populated with metadata for the outputs.
@@ -496,7 +499,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
metadataHandler,
Collections.unmodifiableMap(state.expandedArtifacts),
filesets,
- state.actionFileSystem)) {
+ state.actionFileSystem,
+ skyframeDepsResult)) {
if (!state.hasExecutedAction()) {
state.value =
skyframeActionExecutor.executeAction(
@@ -597,7 +601,7 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
}
}
- private static void establishSkyframeDependencies(Environment env, Action action)
+ private static Object establishSkyframeDependencies(Environment env, Action action)
throws ActionExecutionException, InterruptedException {
// Before we may safely establish Skyframe dependencies, we must build all action inputs by
// requesting their ArtifactValues.
@@ -614,11 +618,12 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
Preconditions.checkState(action.executeUnconditionally(), action);
try {
- ((SkyframeAwareAction) action).establishSkyframeDependencies(env);
+ return ((SkyframeAwareAction) action).establishSkyframeDependencies(env);
} catch (SkyframeAwareAction.ExceptionBase e) {
throw new ActionExecutionException(e, action, false);
}
}
+ return null;
}
private static Iterable<SkyKey> toKeys(