Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,9 @@ public String toString() {
return MoreObjects.toStringHelper(this)
.add("size", size)
.add("all-files", sizeForDebugging())
.add("first-fifty-keys", Arrays.stream(keys).limit(50).collect(toList()))
.add("first-fifty-values", Arrays.stream(values).limit(50).collect(toList()))
.add("first-fifty-paths", Arrays.stream(paths).limit(50).collect(toList()))
.add("first-fifty-keys", Arrays.stream(keys).collect(toList()))
.add("first-fifty-values", Arrays.stream(values).collect(toList()))
.add("first-fifty-paths", Arrays.stream(paths).collect(toList()))
.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,15 @@ private SpawnResult execLocallyAndUploadOrFail(
// remotely, try to regenerate the lost inputs. This doesn't make sense for outputs of the
// current action.
if (reason == FailureReason.UPLOAD && cause instanceof BulkTransferException e) {
ImmutableMap<String, ActionInput> lostInputs =
e.getLostInputs(context.getInputMetadataProvider()::getInput);
ImmutableMap<String, ActionInput> lostInputs;
try {
lostInputs = e.getLostInputs(context.getInputMetadataProvider()::getInput);
} catch (RuntimeException re) {
System.err.printf(
"Action: %s%nSpawn: %s%nIMP: %s%n",
spawn.getResourceOwner(), spawn, context.getInputMetadataProvider());
throw re;
}
if (!lostInputs.isEmpty()) {
throw new LostInputsExecException(
lostInputs, new ActionInputDepOwnerMap(lostInputs.values()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ public ImmutableMap<String, ActionInput> getLostInputs(
var execPath = e.getExecPath();
checkNotNull(execPath, "exec path not known for action input with digest %s", missingDigest);
var actionInput = actionInputResolver.apply(execPath.getPathString());
checkNotNull(
actionInput, "ActionInput not found for filename %s in CacheNotFoundException", execPath);
if (actionInput == null) {
throw new IllegalStateException(
"ActionInput not found for filename %s in CacheNotFoundException".formatted(execPath),
this);
}

lostInputs.put(DigestUtil.toString(missingDigest), actionInput);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public ActionInput getInput(String execPath) {
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("inputArtifactData", inputArtifactData)
.add("inputArtifactDataSize", inputArtifactData.sizeForDebugging())
.toString();
}
Expand Down