Skip to content

Commit 6777112

Browse files
authored
Improve phrasing of digest_function added in #311 (#312)
- Unlike the other messages where a digest_function field was added, ExecuteActionMetadata is returned by the server to the client. This means that the words "client" and "server" need to be swapped around in some but not all places. - To ensure backward compatibility, we permit digest functions that were defined at the time this field was added to remain unset. When the digest_function fields were added to the other messages, the last one to be added was MURMUR3. In the meantime we've added BLAKE3 and SHA256TREE, so for this specific field we must list those as well.
1 parent a6328f5 commit 6777112

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

build/bazel/remote/execution/v2/remote_execution.pb.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,11 +2799,11 @@ type ExecuteOperationMetadata struct {
27992799
PartialExecutionMetadata *ExecutedActionMetadata `protobuf:"bytes,5,opt,name=partial_execution_metadata,json=partialExecutionMetadata,proto3" json:"partial_execution_metadata,omitempty"`
28002800
// The digest function that was used to compute the action digest.
28012801
//
2802-
// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
2803-
// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
2804-
// that case the server SHOULD infer the digest function using the
2805-
// length of the action digest hash and the digest functions announced
2806-
// in the server's capabilities.
2802+
// If the digest function used is one of BLAKE3, MD5, MURMUR3, SHA1,
2803+
// SHA256, SHA256TREE, SHA384, SHA512, or VSO, the server MAY leave
2804+
// this field unset. In that case the client SHOULD infer the digest
2805+
// function using the length of the action digest hash and the digest
2806+
// functions announced in the server's capabilities.
28072807
DigestFunction DigestFunction_Value `protobuf:"varint,6,opt,name=digest_function,json=digestFunction,proto3,enum=build.bazel.remote.execution.v2.DigestFunction_Value" json:"digest_function,omitempty"`
28082808
}
28092809

build/bazel/remote/execution/v2/remote_execution.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,11 +1560,11 @@ message ExecuteOperationMetadata {
15601560

15611561
// The digest function that was used to compute the action digest.
15621562
//
1563-
// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
1564-
// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
1565-
// that case the server SHOULD infer the digest function using the
1566-
// length of the action digest hash and the digest functions announced
1567-
// in the server's capabilities.
1563+
// If the digest function used is one of BLAKE3, MD5, MURMUR3, SHA1,
1564+
// SHA256, SHA256TREE, SHA384, SHA512, or VSO, the server MAY leave
1565+
// this field unset. In that case the client SHOULD infer the digest
1566+
// function using the length of the action digest hash and the digest
1567+
// functions announced in the server's capabilities.
15681568
DigestFunction.Value digest_function = 6;
15691569
}
15701570

0 commit comments

Comments
 (0)