Skip to content

Commit

Permalink
Increase client gRPC max size to match server (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
markterm committed Mar 25, 2020
1 parent d8aa477 commit 661d1b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/apiclient/argo-server-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import (
workflowtemplatepkg "github.com/argoproj/argo/pkg/apiclient/workflowtemplate"
)

const (
// MaxGRPCMessageSize contains max grpc message size supported by the client
MaxClientGRPCMessageSize = 100 * 1024 * 1024
)

type argoServerClient struct {
*grpc.ClientConn
}
Expand Down Expand Up @@ -41,7 +46,7 @@ func (a *argoServerClient) NewArchivedWorkflowServiceClient() (workflowarchivepk
}

func NewClientConn(argoServer string) (*grpc.ClientConn, error) {
conn, err := grpc.Dial(argoServer, grpc.WithInsecure())
conn, err := grpc.Dial(argoServer, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxClientGRPCMessageSize)), grpc.WithInsecure())
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 661d1b6

Please sign in to comment.