Skip to content

Commit 2de9d44

Browse files
committed
RequestMetadata: Make tool_details repeated
It is possible for more than one tool to be involved in the sending of a gRPC request, for example when a client-side proxy is used it is interesting to know the name and version of both the proxy and the original client tool. To facilitate this in RequestMetadata, this commit updates the tool_details field to be `repeated`, allowing proxies and other related tools to also be recorded in the metadata sent with requests.
1 parent 0d21f29 commit 2de9d44

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4342,8 +4342,8 @@ type RequestMetadata struct {
43424342
sizeCache protoimpl.SizeCache
43434343
unknownFields protoimpl.UnknownFields
43444344

4345-
// The details for the tool invoking the requests.
4346-
ToolDetails *ToolDetails `protobuf:"bytes,1,opt,name=tool_details,json=toolDetails,proto3" json:"tool_details,omitempty"`
4345+
// The details for the tools involved in sending the requests.
4346+
ToolDetails []*ToolDetails `protobuf:"bytes,1,rep,name=tool_details,json=toolDetails,proto3" json:"tool_details,omitempty"`
43474347
// An identifier that ties multiple requests to the same action.
43484348
// For example, multiple requests to the CAS, Action Cache, and Execution
43494349
// API are used in order to compile foo.cc.
@@ -4399,7 +4399,7 @@ func (*RequestMetadata) Descriptor() ([]byte, []int) {
43994399
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{44}
44004400
}
44014401

4402-
func (x *RequestMetadata) GetToolDetails() *ToolDetails {
4402+
func (x *RequestMetadata) GetToolDetails() []*ToolDetails {
44034403
if x != nil {
44044404
return x.ToolDetails
44054405
}
@@ -5643,7 +5643,7 @@ var file_build_bazel_remote_execution_v2_remote_execution_proto_rawDesc = []byte
56435643
0x74, 0x6f, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x02, 0x0a, 0x0f,
56445644
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,
56455645
0x4f, 0x0a, 0x0c, 0x74, 0x6f, 0x6f, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18,
5646-
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x62, 0x61,
5646+
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x62, 0x61,
56475647
0x7a, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75,
56485648
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x6f, 0x6f, 0x6c, 0x44, 0x65, 0x74, 0x61,
56495649
0x69, 0x6c, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x6f, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,8 +2103,8 @@ message ToolDetails {
21032103
// metadata, the user may ignore the base64 encoding and assume it is simply
21042104
// serialized as a binary message.
21052105
message RequestMetadata {
2106-
// The details for the tool invoking the requests.
2107-
ToolDetails tool_details = 1;
2106+
// The details for the tools involved in sending the requests.
2107+
repeated ToolDetails tool_details = 1;
21082108

21092109
// An identifier that ties multiple requests to the same action.
21102110
// For example, multiple requests to the CAS, Action Cache, and Execution

0 commit comments

Comments
 (0)