diff --git a/pkg/cloudagents/build.go b/pkg/cloudagents/build.go index 91d3ce7a..f99523b9 100644 --- a/pkg/cloudagents/build.go +++ b/pkg/cloudagents/build.go @@ -69,6 +69,7 @@ func (c *Client) build(ctx context.Context, id string, environment string, write eg.Go(func() error { defer close(ch) scanner := bufio.NewScanner(resp.Body) + scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), 4*1024*1024) for scanner.Scan() { line := scanner.Text() if strings.HasPrefix(line, "BUILD ERROR:") { diff --git a/pkg/cloudagents/logs.go b/pkg/cloudagents/logs.go index d05ec714..94bd7889 100644 --- a/pkg/cloudagents/logs.go +++ b/pkg/cloudagents/logs.go @@ -61,6 +61,7 @@ func (c *Client) StreamLogs(ctx context.Context, logType, agentID, environment s return fmt.Errorf("failed to get logs: %s - %v", errorResponse.Message, errorResponse.Meta) } scanner := bufio.NewScanner(resp.Body) + scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), 4*1024*1024) for { select { case <-ctx.Done():