Skip to content

Commit

Permalink
Fixed a bug that could fail the build if unable to findMissingBlobs.
Browse files Browse the repository at this point in the history
Closes bazelbuild#12369.

PiperOrigin-RevId: 339427586
  • Loading branch information
coeuvre authored and copybara-github committed Oct 28, 2020
1 parent e794ee6 commit 5a2b7df
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import build.bazel.remote.execution.v2.FindMissingBlobsRequest;
import build.bazel.remote.execution.v2.FindMissingBlobsResponse;
import build.bazel.remote.execution.v2.GetActionResultRequest;
import build.bazel.remote.execution.v2.RequestMetadata;
import build.bazel.remote.execution.v2.UpdateActionResultRequest;
import com.google.bytestream.ByteStreamGrpc;
import com.google.bytestream.ByteStreamGrpc.ByteStreamStub;
Expand Down Expand Up @@ -198,6 +199,8 @@ public ListenableFuture<ImmutableSet<Digest>> findMissingDigests(Iterable<Digest
return result.build();
},
MoreExecutors.directExecutor());

RequestMetadata requestMetadata = TracingMetadataUtils.fromCurrentContext();
return Futures.catchingAsync(
success,
RuntimeException.class,
Expand All @@ -207,7 +210,7 @@ public ListenableFuture<ImmutableSet<Digest>> findMissingDigests(Iterable<Digest
String.format(
"findMissingBlobs(%d) for %s: %s",
requestBuilder.getBlobDigestsCount(),
TracingMetadataUtils.fromCurrentContext().getActionId(),
requestMetadata.getActionId(),
e.getMessage()),
e)),
MoreExecutors.directExecutor());
Expand Down

0 comments on commit 5a2b7df

Please sign in to comment.