From df493d0b60b3e503c027ed1e024e552c625cd4ef Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Wed, 28 Oct 2026 17:28:23 +1000 Subject: [PATCH] chore: minor comments in common proto --- api/pb/common.pb.go | 3 ++- api/pb/common.proto | 3 ++- pkg/client/client.go | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/pb/common.pb.go b/api/pb/common.pb.go index 07f2e92a..771b0515 100644 --- a/api/pb/common.pb.go +++ b/api/pb/common.pb.go @@ -87,7 +87,8 @@ type Metadata struct { MachineName string `protobuf:"bytes,5,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"` // Address of the machine the response came from. MachineAddr string `protobuf:"bytes,1,opt,name=machine_addr,json=machineAddr,proto3" json:"machine_addr,omitempty"` - // error is set if the request to upstream failed. The rest of the response is undefined. + // error is set if the request to upstream failed. The rest of the response apart from this metadata message + // is undefined. Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // error as a gRPC Status message. Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` diff --git a/api/pb/common.proto b/api/pb/common.proto index 8e74d502..1ee2ced4 100644 --- a/api/pb/common.proto +++ b/api/pb/common.proto @@ -18,7 +18,8 @@ message Metadata { // Address of the machine the response came from. string machine_addr = 1; - // error is set if the request to upstream failed. The rest of the response is undefined. + // error is set if the request to upstream failed. The rest of the response apart from this metadata message + // is undefined. string error = 2; // error as a gRPC Status message. google.rpc.Status status = 3; diff --git a/pkg/client/client.go b/pkg/client/client.go index 43232fcd..5884580c 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -86,6 +86,7 @@ func (cli *Client) progressOut() *streams.Out { // ProxyMachinesContext returns a new context that proxies gRPC requests to the specified machines. // If namesOrIDs is nil or empty, all machines are included. // This triggers One2Many proxying, which always injects metadata into the response. +// TODO: validate namesOrIDs can't contain "*" as this is reserved as internal value and may break the caller logic. func ProxyMachinesContext(ctx context.Context, namesOrIDs []string) context.Context { md := outgoingMetadataWithoutProxyTargets(ctx) if len(namesOrIDs) == 0 {