feat(executor): default 512 MB grpc msg size
All checks were successful
submodules sync / sync (push) Successful in 41s
build / build (push) Successful in 1m17s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-11-06 07:20:05 -05:00
parent 0cb1a63025
commit adb9dd2a9a
GPG Key ID: D47306D7062CDA9D
2 changed files with 4 additions and 1 deletions

View File

@ -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}
pbRet, err := e.execClient.Exec(context.TODO(), pbReq)
if err != nil {

View File

@ -23,6 +23,9 @@ func createExecClient(execServer, token string) (pb.ExecutorClient, error) {
func createGRPCConnection(addr, token string) (*grpc.ClientConn, error) {
opts := []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(512 * 1024 * 1024), // 512 MB
),
}
if token != "" {
opts = append(opts, grpc.WithPerRPCCredentials(newTokenAuth(token)))