Skip to content

Commit

Permalink
RequestMetadata: Make tool_details repeated
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ColdrickSotK committed Aug 7, 2024
1 parent 0d21f29 commit 2de9d44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build/bazel/remote/execution/v2/remote_execution.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4342,8 +4342,8 @@ type RequestMetadata struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

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

func (x *RequestMetadata) GetToolDetails() *ToolDetails {
func (x *RequestMetadata) GetToolDetails() []*ToolDetails {
if x != nil {
return x.ToolDetails
}
Expand Down Expand Up @@ -5643,7 +5643,7 @@ var file_build_bazel_remote_execution_v2_remote_execution_proto_rawDesc = []byte
0x74, 0x6f, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x02, 0x0a, 0x0f,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,
0x4f, 0x0a, 0x0c, 0x74, 0x6f, 0x6f, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x62, 0x61,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x62, 0x61,
0x7a, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x6f, 0x6f, 0x6c, 0x44, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x6f, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
Expand Down
4 changes: 2 additions & 2 deletions build/bazel/remote/execution/v2/remote_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2103,8 +2103,8 @@ message ToolDetails {
// metadata, the user may ignore the base64 encoding and assume it is simply
// serialized as a binary message.
message RequestMetadata {
// The details for the tool invoking the requests.
ToolDetails tool_details = 1;
// The details for the tools involved in sending the requests.
repeated ToolDetails tool_details = 1;

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

0 comments on commit 2de9d44

Please sign in to comment.