Skip to content

Commit

Permalink
Write the action digest to the execution log also for cache misses.
Browse files Browse the repository at this point in the history
Specifically, introduce a getter/setter pair to store the digest in the SpawnExecutionContext when looking up the disk or remote cache, and retrieve it later when constructing the SpawnResult.

Fixes #16741.

PiperOrigin-RevId: 577799982
  • Loading branch information
tjgq authored and copybara-github committed Oct 30, 2023
1 parent 0efeceb commit 27bf3aa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions third_party/bazel/src/main/protobuf/spawn.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ import "google/protobuf/duration.proto";
option java_package = "com.google.devtools.build.lib.exec";
option java_outer_classname = "Protos";

// Digest of a file or action cache entry.
message Digest {
// Digest of a file's contents using the current FileSystem digest function.
// The content hash.
string hash = 1;

// The size in bytes of the original content.
// The original content size in bytes.
int64 size_bytes = 2;

// The digest function that was used to generate the hash.
Expand All @@ -39,7 +40,7 @@ message File {
// Path to the file relative to the execution root.
string path = 1;

// Digest of the file's contents.
// File digest.
Digest digest = 2;

// Whether the file is a tool.
Expand Down Expand Up @@ -183,7 +184,9 @@ message SpawnExec {
// set.
string target_label = 18;

// A unique identifier for this Spawn.
// The action cache digest.
// Only available when remote execution, remote cache or disk cache was
// enabled for this spawn.
Digest digest = 19;

// Timing, size and memory statistics.
Expand Down

0 comments on commit 27bf3aa

Please sign in to comment.