feat(executor): default 512 MB grpc msg size
This commit is contained in:
parent
0cb1a63025
commit
adb9dd2a9a
|
@ -59,7 +59,7 @@ func (e *Sandbox) Run(cmds []stage.Cmd) ([]stage.ExecutorResult, error) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slog.Debug("sandbox execute", "total protobuf cmd size", totalPbCmdSize)
|
slog.Info("sandbox execute", "total protobuf cmd size", totalPbCmdSize)
|
||||||
pbReq := &pb.Request{Cmd: pbCmds}
|
pbReq := &pb.Request{Cmd: pbCmds}
|
||||||
pbRet, err := e.execClient.Exec(context.TODO(), pbReq)
|
pbRet, err := e.execClient.Exec(context.TODO(), pbReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -23,6 +23,9 @@ func createExecClient(execServer, token string) (pb.ExecutorClient, error) {
|
||||||
func createGRPCConnection(addr, token string) (*grpc.ClientConn, error) {
|
func createGRPCConnection(addr, token string) (*grpc.ClientConn, error) {
|
||||||
opts := []grpc.DialOption{
|
opts := []grpc.DialOption{
|
||||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
|
grpc.WithDefaultCallOptions(
|
||||||
|
grpc.MaxCallRecvMsgSize(512 * 1024 * 1024), // 512 MB
|
||||||
|
),
|
||||||
}
|
}
|
||||||
if token != "" {
|
if token != "" {
|
||||||
opts = append(opts, grpc.WithPerRPCCredentials(newTokenAuth(token)))
|
opts = append(opts, grpc.WithPerRPCCredentials(newTokenAuth(token)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user