Skip to content

Commit

Permalink
fix: set max receive size to 100Mb from 4Mb (#2442)
Browse files Browse the repository at this point in the history
Closes #2357
  • Loading branch information
h4ck3rk3y authored May 9, 2024
1 parent 7a48d88 commit 6c70ffd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/golang/engine/lib/kurtosis_context/kurtosis_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (

defaultShouldAPICRunInDebugMode = false
runAPICInDebugMode = true

hundredMegabytes = 100 * 1024 * 1024
)

var (
Expand Down Expand Up @@ -72,7 +74,7 @@ func NewKurtosisContextFromLocalEngine() (*KurtosisContext, error) {
kurtosisEngineSocketStr := fmt.Sprintf("%v:%v", localHostIPAddressStr, DefaultGrpcEngineServerPortNum)

// TODO SECURITY: Use HTTPS to ensure we're connecting to the real Kurtosis API servers
conn, err := grpc.Dial(kurtosisEngineSocketStr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.Dial(kurtosisEngineSocketStr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(hundredMegabytes)))
if err != nil {
return nil, stacktrace.Propagate(
err,
Expand Down Expand Up @@ -457,7 +459,7 @@ func newEnclaveContextFromEnclaveInfo(
apiContainerHostMachineInfo.GrpcPortOnHostMachine,
)
// TODO SECURITY: use HTTPS!
apiContainerConn, err := grpc.Dial(apiContainerHostMachineUrl, grpc.WithTransportCredentials(insecure.NewCredentials()))
apiContainerConn, err := grpc.Dial(apiContainerHostMachineUrl, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(hundredMegabytes)))
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred connecting to the API container on host machine URL '%v'", apiContainerHostMachineUrl)
}
Expand Down

0 comments on commit 6c70ffd

Please sign in to comment.